├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .npmrc ├── .prettierrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs-sdk ├── .gitignore ├── .npmrc ├── .prettierrc ├── README.md ├── docs-consumer │ ├── develop-tips.md │ ├── docs │ │ ├── breezr.config.js │ │ └── document.md │ ├── package.json │ ├── src │ │ └── index.tsx │ └── tsconfig.json ├── docs-provider │ ├── .npmignore │ ├── README.md │ ├── bin │ │ └── oss-upload.js │ ├── package.json │ ├── src │ │ ├── assets-upload-plugin.ts │ │ ├── build-external-deps.ts │ │ ├── config-webpack-plugin.ts │ │ ├── demo-info-loader.ts │ │ ├── getModifyPresetConfig.ts │ │ ├── index.ts │ │ ├── js-file-static-meta-loader.ts │ │ ├── main-plugin.ts │ │ ├── md-file-static-meta-loader.ts │ │ ├── scripts │ │ │ ├── configs │ │ │ │ ├── deps.ts │ │ │ │ └── host.ts │ │ │ ├── deps-build.ts │ │ │ ├── deps-serve.ts │ │ │ ├── host-serve.ts │ │ │ └── runScript.ts │ │ ├── tsconfig.json │ │ └── type-info-loader │ │ │ ├── collectInterfaceInfo.ts │ │ │ └── index.ts │ ├── src2 │ │ ├── BuildDeps │ │ │ └── index.ts │ │ ├── DemoContainer │ │ │ ├── CodeBlock.tsx │ │ │ ├── FullView.tsx │ │ │ ├── codemirror.less │ │ │ ├── codesandbox │ │ │ │ ├── createCodesandbox.ts │ │ │ │ └── index.tsx │ │ │ ├── index.scoped.less │ │ │ ├── index.tsx │ │ │ ├── useEvalCode.tsx │ │ │ └── useOperations.tsx │ │ ├── DemoWrapper │ │ │ └── index.tsx │ │ ├── Host.tsx │ │ ├── HostApp │ │ │ └── index.tsx │ │ ├── Loader.tsx │ │ ├── Overview │ │ │ ├── DemoList.tsx │ │ │ ├── index.scoped.less │ │ │ └── index.tsx │ │ ├── TypeInfoRenderer │ │ │ └── Interface.tsx │ │ ├── declare.d.ts │ │ ├── demoOpts.ts │ │ ├── index.html │ │ ├── index.tsx │ │ ├── set-public-path.ts │ │ └── utils │ │ │ ├── copy.ts │ │ │ └── expand.ts │ └── tsconfig.json ├── examples │ ├── docs-consumer │ │ ├── breezr.config.js │ │ ├── package.json │ │ ├── src │ │ │ ├── index.html │ │ │ └── index.tsx │ │ └── tsconfig.json │ ├── docs-provider │ │ ├── .gitignore │ │ ├── breezr.config.js │ │ ├── demoOpts.tsx │ │ ├── package.json │ │ ├── resolveAppServePath.ts │ │ ├── src │ │ │ ├── demos │ │ │ │ ├── demo1.tsx │ │ │ │ └── demo2.tsx │ │ │ ├── markdowns │ │ │ │ ├── document.md │ │ │ │ ├── md1.md │ │ │ │ └── md2.md │ │ │ ├── test-external-module-in-dev.ts │ │ │ └── types │ │ │ │ └── test.type.ts │ │ └── tsconfig.json │ └── markdown-renderer │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── breezr.config.js │ │ ├── package.json │ │ ├── src │ │ ├── index.html │ │ ├── index.less │ │ ├── index.tsx │ │ ├── testMd.md │ │ └── testMd2.md │ │ └── tsconfig.json ├── fusion-css-loader │ ├── .gitignore │ ├── README.md │ ├── fixture │ │ ├── dist2 │ │ │ ├── main.css │ │ │ └── main.js │ │ ├── index.js │ │ ├── mock-custom-theme.css │ │ ├── mock-fusion-icon.css │ │ ├── mock-fusion.css │ │ ├── mock-var.css │ │ └── webpack.config.js │ ├── package.json │ ├── src │ │ ├── declare.d.ts │ │ └── index.ts │ └── tsconfig.json ├── markdown-renderer │ ├── .babelrc │ ├── TODO │ ├── package.json │ ├── src │ │ ├── Layout │ │ │ ├── TableOfContent │ │ │ │ └── index.tsx │ │ │ └── index.tsx │ │ ├── MarkdownComponents │ │ │ ├── CodeBlock.tsx │ │ │ ├── HeaderWithAnchor │ │ │ │ └── index.tsx │ │ │ ├── anchor.tsx │ │ │ ├── code.tsx │ │ │ ├── heading.tsx │ │ │ ├── index.tsx │ │ │ ├── list.tsx │ │ │ └── table.tsx │ │ ├── index.tsx │ │ └── utils │ │ │ ├── getScrollParent.ts │ │ │ ├── useScrollToAnchor.ts │ │ │ └── useTOC.ts │ └── tsconfig.json ├── package.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── shared │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── types.ts │ └── tsconfig.json └── site │ ├── next-env.d.ts │ ├── package.json │ ├── pages │ └── about.tsx │ └── tsconfig.json ├── docs └── quick.md ├── jest.config.js ├── package.json ├── packages ├── babel-plugin-transform-loadable-component │ ├── __tests__ │ │ ├── fixtures │ │ │ ├── complex-normal │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── normal │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── with-existing-react-loadable-import │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── without-default-import-reference │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── without-import-reference │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── without-prop-async │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── without-prop-loading │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ └── without-referenced-component │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ └── index.test.js │ ├── jest.config.js │ ├── package.json │ └── src │ │ ├── ast.js │ │ ├── index.js │ │ └── utils.js ├── babel-plugin-wind-rc │ ├── __tests__ │ │ ├── fixtures │ │ │ ├── import-specifier │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── option-css-file-path │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── option-exclude-patterns │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── option-include-patterns │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ └── with-options │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ └── index.test.js │ ├── jest.config.js │ ├── lib │ │ └── index.js │ └── package.json ├── babel-plugin-wind │ ├── README.md │ ├── __tests__ │ │ ├── fixtures │ │ │ ├── multi-import-specifiers │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── single-import-specifier │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── with-alias-multi-import-specifiers │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── with-alias-single-import-specifier │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── with-conflict │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── with-namespace │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ └── with-other-imports │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ └── index.test.js │ ├── package.json │ └── src │ │ ├── Cache.js │ │ ├── ImportCollection.js │ │ ├── getImportIdentifier.js │ │ ├── index.js │ │ └── validator.js ├── babel-preset-breezr-wind │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── test │ │ ├── fixtures │ │ │ ├── async-await │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── decorator │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── generator │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── optional-chaining │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ └── react │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ └── index.test.ts │ └── tsconfig.json ├── babel-preset-breezr │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── combineCreators.ts │ │ ├── createPluginCreator.ts │ │ ├── createPlugins.ts │ │ ├── createPresets.ts │ │ ├── defaultOptions.ts │ │ ├── index.ts │ │ ├── types.ts │ │ ├── untyped-modules.d.ts │ │ └── utils.ts │ ├── test │ │ ├── fixtures │ │ │ ├── async-await │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── decorator │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── generator │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ ├── optional-chaining │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ └── react │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ └── index.test.ts │ └── tsconfig.json ├── cli │ ├── .npmignore │ ├── README.md │ ├── bin │ │ ├── breezr.js │ │ ├── start.js │ │ └── updator.js │ ├── jest.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── test │ │ └── index.test.ts │ ├── tsconfig.json │ └── tslint.json ├── core-lib-conf │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── core │ ├── .gitignore │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── PluginAPI.ts │ │ ├── Service.ts │ │ ├── index.ts │ │ ├── plugins │ │ │ ├── commands │ │ │ │ └── help.ts │ │ │ ├── common │ │ │ │ └── index.ts │ │ │ └── config │ │ │ │ ├── config.ts │ │ │ │ └── options.ts │ │ ├── types │ │ │ ├── Command.ts │ │ │ ├── PluginAPI.ts │ │ │ └── ServiceOption.ts │ │ └── utils │ │ │ ├── getPadLength.ts │ │ │ ├── pluginResolver.ts │ │ │ └── presetResovler.ts │ ├── test │ │ └── index.test.ts │ ├── tsconfig.json │ └── tslint.json ├── eslint-config-breezr │ ├── README.md │ ├── config │ │ ├── es5.js │ │ ├── es6.js │ │ ├── import.js │ │ ├── jsx-a11y.js │ │ ├── lodash.js │ │ ├── react.js │ │ ├── ts.js │ │ └── tsx.js │ ├── es5.js │ ├── es6.js │ ├── index.js │ ├── package.json │ ├── react.js │ ├── rules │ │ ├── es.js │ │ ├── es5-only.js │ │ ├── es6-only.js │ │ ├── import.js │ │ ├── lodash.js │ │ ├── react.js │ │ ├── ts.js │ │ └── tsx.js │ ├── ts.js │ └── tsx.js ├── example │ ├── .gitignore │ ├── .npmignore │ └── package.json ├── generator-breezr │ ├── generators │ │ └── library │ │ │ ├── index.js │ │ │ ├── prompts.js │ │ │ └── templates │ │ │ ├── README.md │ │ │ ├── config │ │ │ └── config.js │ │ │ ├── dotfiles │ │ │ ├── gitignore │ │ │ ├── npmignore │ │ │ └── npmrc │ │ │ ├── package.json │ │ │ ├── package.ts.json │ │ │ ├── src │ │ │ ├── pure │ │ │ │ ├── index.js │ │ │ │ └── index.less │ │ │ ├── stateful │ │ │ │ ├── index.js │ │ │ │ └── index.less │ │ │ └── stateless │ │ │ │ ├── index.js │ │ │ │ └── index.less │ │ │ ├── stories │ │ │ └── index.stories.jsx │ │ │ ├── tests │ │ │ └── index.spec.jsx │ │ │ ├── tsconfig │ │ │ ├── config │ │ │ │ └── config.js │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ │ ├── tssrc │ │ │ ├── pure │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── stateful │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ └── stateless │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── tsstories │ │ │ └── index.stories.tsx │ │ │ └── tstests │ │ │ └── index.spec.tsx │ ├── package.json │ └── utils.js ├── mkcert-bin │ ├── .npmignore │ ├── LICENSE-mkcert.txt │ ├── README.md │ ├── bin │ │ ├── mkcert-v1.4.4-darwin-amd64 │ │ ├── mkcert-v1.4.4-darwin-arm64 │ │ ├── mkcert-v1.4.4-linux-amd64 │ │ ├── mkcert-v1.4.4-linux-arm │ │ ├── mkcert-v1.4.4-linux-arm64 │ │ ├── mkcert-v1.4.4-windows-amd64.exe │ │ └── mkcert-v1.4.4-windows-arm64.exe │ ├── package.json │ ├── scripts │ │ └── postinstall.js │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── plugin-arms │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-babel │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── scripts │ │ └── link.js │ ├── src │ │ ├── index.ts │ │ ├── types │ │ │ ├── babel__core.d.ts │ │ │ ├── fs-readdir-recursive.d.ts │ │ │ └── output-file-sync.d.ts │ │ └── util.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-block │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── ctx.ts │ │ ├── dep.ts │ │ ├── generator.ts │ │ ├── git.ts │ │ ├── help.ts │ │ ├── index.ts │ │ ├── replace.ts │ │ └── types │ │ │ ├── index.ts │ │ │ ├── mkdirp.d.ts │ │ │ └── semver.d.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-browser-hint │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-builtin │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── BuiltInConfig.ts │ │ ├── build.ts │ │ ├── dev.ts │ │ ├── index.ts │ │ ├── init.ts │ │ ├── inspect.ts │ │ └── utils │ │ │ └── validateWebpackConfig.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-cdn │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── generateCdnPath.ts │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-console-base │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-dll │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── buildDll.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── type.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-docs │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── src │ │ ├── docsBuild.ts │ │ ├── docsDev.ts │ │ ├── docsUpload.ts │ │ ├── index.ts │ │ ├── loaders │ │ │ ├── demo-info-loader.ts │ │ │ ├── js-file-static-meta-loader.ts │ │ │ ├── md-file-static-meta-loader.ts │ │ │ └── type-info-loader │ │ │ │ ├── collectInterfaceInfo.ts │ │ │ │ └── index.ts │ │ ├── plugins │ │ │ ├── build-external-deps-plugin.ts │ │ │ ├── config-webpack-plugin.ts │ │ │ ├── main-plugin.ts │ │ │ └── upload-plugin.ts │ │ ├── scripts │ │ │ ├── configs │ │ │ │ ├── deps.ts │ │ │ │ └── host.ts │ │ │ ├── deps-build.ts │ │ │ ├── deps-serve.ts │ │ │ ├── host-serve.ts │ │ │ └── runScript.ts │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── IDataFileInfo.ts │ │ │ ├── IExternalItem.ts │ │ │ ├── IParams.ts │ │ │ ├── IUploadConfigInfo.ts │ │ │ └── index.ts │ ├── src2 │ │ ├── BuildDeps │ │ │ └── index.ts │ │ ├── DemoContainer │ │ │ ├── CodeBlock.tsx │ │ │ ├── FullView.tsx │ │ │ ├── codemirror.less │ │ │ ├── codesandbox │ │ │ │ ├── createCodesandbox.ts │ │ │ │ └── index.tsx │ │ │ ├── index.scoped.less │ │ │ ├── index.tsx │ │ │ ├── useEvalCode.tsx │ │ │ └── useOperations.tsx │ │ ├── DemoWrapper │ │ │ └── index.tsx │ │ ├── Host.tsx │ │ ├── HostApp │ │ │ └── index.tsx │ │ ├── Loader.tsx │ │ ├── Overview │ │ │ ├── DemoList.tsx │ │ │ ├── index.scoped.less │ │ │ └── index.tsx │ │ ├── TypeInfoRenderer │ │ │ └── Interface.tsx │ │ ├── declare.d.ts │ │ ├── demoOpts.ts │ │ ├── index.html │ │ ├── index.tsx │ │ ├── set-public-path.ts │ │ └── utils │ │ │ ├── copy.ts │ │ │ └── expand.ts │ └── tsconfig.json ├── plugin-esbuild │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-generator │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── ctx.ts │ │ ├── generate.ts │ │ ├── generateMap.ts │ │ ├── git.ts │ │ ├── index.ts │ │ ├── prepareGitTemplate.ts │ │ └── types │ │ │ ├── index.ts │ │ │ ├── mkdirp.d.ts │ │ │ └── semver.d.ts │ ├── tsconfig.json │ ├── tslint.json │ └── types │ │ └── yeoman-environment.d.ts ├── plugin-less │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── copy-dir.d.ts │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-long-term-caching │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── getHtmlFilename.ts │ │ ├── index.ts │ │ ├── normalize.ts │ │ └── setOptimization.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-mocks │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-oneconsole │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── plugin-react │ ├── .gitignore │ ├── .npmignore │ ├── CHANGELOG.md │ ├── package.json │ ├── src │ │ ├── development.ts │ │ ├── html │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── production.ts │ │ ├── types │ │ │ ├── error-overlay-webpack-plugin.d.ts │ │ │ ├── happypack.d.ts │ │ │ ├── index.d.ts │ │ │ ├── open-browser-webpack-plugin.d.ts │ │ │ ├── optimize-css-assets-webpack-plugin.d.ts │ │ │ ├── simple-progress-webpack-plugin.d.ts │ │ │ ├── terser-webpack-plugin.d.ts │ │ │ └── webpack-bundle-analyzer.d.ts │ │ ├── utils.ts │ │ └── webpack │ │ │ ├── common.ts │ │ │ ├── dev.ts │ │ │ ├── plugins │ │ │ ├── analyzer.ts │ │ │ ├── define.ts │ │ │ ├── errorOverlay.ts │ │ │ ├── hmr.ts │ │ │ ├── html.ts │ │ │ ├── htmlInject.ts │ │ │ ├── moment.ts │ │ │ ├── openBrowser.ts │ │ │ ├── progress.ts │ │ │ ├── reactRefresh.ts │ │ │ ├── skeleton.ts │ │ │ └── uglify.ts │ │ │ ├── prod.ts │ │ │ └── rules │ │ │ ├── file.ts │ │ │ ├── index.ts │ │ │ ├── jsx │ │ │ ├── es5ImcompatibleVersions.ts │ │ │ └── index.ts │ │ │ └── style │ │ │ ├── conditions.ts │ │ │ ├── index.ts │ │ │ └── normalizeTheme.ts │ ├── test │ │ ├── fixtures │ │ │ └── breezr.config.js │ │ └── index.ts │ ├── tpl │ │ ├── empty.css │ │ └── index.html │ └── tsconfig.json ├── plugin-rollup │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── scripts │ │ └── link.js │ ├── src │ │ ├── compile.ts │ │ ├── handleError.ts │ │ ├── index.ts │ │ ├── logger.ts │ │ ├── mismodules.d.ts │ │ └── path.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-sass │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── plugin-ssr │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── buildServer.ts │ │ ├── cmd │ │ │ ├── doctor.ts │ │ │ └── render.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── utils.ts │ ├── tests │ │ └── fixtures │ │ │ └── breezr.config.js │ └── tsconfig.json ├── plugin-storybook │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── index.ts │ │ └── types │ │ │ └── storybook.d.ts │ ├── test │ │ └── fixtures │ │ │ ├── breezr.config.js │ │ │ ├── src │ │ │ └── index.js │ │ │ └── stories │ │ │ └── index.stories.tsx │ ├── tsconfig.json │ └── tslint.json ├── plugin-styled-components-isolation │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── index.ts │ │ └── warning.ts │ ├── test │ │ ├── __const__.ts │ │ ├── __utils__.ts │ │ ├── bundle.spec.ts │ │ ├── fixtures │ │ │ └── bundle │ │ │ │ ├── normal │ │ │ │ ├── actual.js │ │ │ │ ├── config.js │ │ │ │ └── expected.js │ │ │ │ └── with-extra-define │ │ │ │ ├── actual.js │ │ │ │ ├── config.js │ │ │ │ └── expected.js │ │ └── index.spec.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-typescript │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── declare.d.ts │ │ └── index.ts │ └── tsconfig.json ├── plugin-unit-jest │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── defaultBabelJestTransformer.ts │ │ ├── getActualJestConfig.ts │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-updator │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-webpack │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── scripts │ │ └── link.js │ ├── src │ │ ├── build.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── start.ts │ │ ├── type.ts │ │ └── webpackUtils.ts │ ├── test │ │ ├── demo │ │ │ ├── index.js │ │ │ ├── utils.js │ │ │ └── webpack.config.js │ │ └── index.test.ts │ ├── tsconfig.json │ └── tslint.json ├── plugin-webpack5-builtins │ ├── README.md │ └── package.json ├── plugin-webpack5-mocks │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── plugin-webpack5-react │ ├── .gitignore │ ├── .npmignore │ ├── CHANGELOG.md │ ├── package.json │ ├── src │ │ ├── development.ts │ │ ├── html │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── production.ts │ │ ├── types │ │ │ ├── error-overlay-webpack-plugin.d.ts │ │ │ ├── happypack.d.ts │ │ │ ├── index.d.ts │ │ │ ├── open-browser-webpack-plugin.d.ts │ │ │ ├── optimize-css-assets-webpack-plugin.d.ts │ │ │ ├── simple-progress-webpack-plugin.d.ts │ │ │ ├── terser-webpack-plugin.d.ts │ │ │ └── webpack-bundle-analyzer.d.ts │ │ ├── utils.ts │ │ └── webpack │ │ │ ├── common.ts │ │ │ ├── dev.ts │ │ │ ├── plugins │ │ │ ├── analyzer.ts │ │ │ ├── define.ts │ │ │ ├── errorOverlay.ts │ │ │ ├── html.ts │ │ │ ├── htmlInject.ts │ │ │ ├── mf.ts │ │ │ ├── moment.ts │ │ │ ├── openBrowser.ts │ │ │ ├── progress.ts │ │ │ ├── provide.ts │ │ │ ├── reactRefresh.ts │ │ │ ├── skeleton.ts │ │ │ └── uglify.ts │ │ │ ├── prod.ts │ │ │ └── rules │ │ │ ├── file.ts │ │ │ ├── index.ts │ │ │ ├── jsx │ │ │ ├── es5ImcompatibleVersions.ts │ │ │ └── index.ts │ │ │ └── style │ │ │ ├── conditions.ts │ │ │ ├── index.ts │ │ │ └── normalizeTheme.ts │ ├── test │ │ ├── fixtures │ │ │ └── breezr.config.js │ │ └── index.ts │ ├── tpl │ │ ├── empty.css │ │ └── index.html │ └── tsconfig.json ├── plugin-webpack5-sass │ ├── .gitignore │ ├── .npmignore │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── plugin-webpack5-ssr │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── buildServer.ts │ │ ├── cmd │ │ │ ├── doctor.ts │ │ │ └── render.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── utils.ts │ ├── tests │ │ └── fixtures │ │ │ └── breezr.config.js │ └── tsconfig.json ├── plugin-webpack5-typescript │ ├── .npmignore │ ├── package.json │ ├── src │ │ ├── declare.d.ts │ │ └── index.ts │ └── tsconfig.json ├── plugin-webpack5 │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── scripts │ │ └── link.js │ ├── src │ │ ├── build.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── start.ts │ │ ├── type.ts │ │ └── webpackUtils.ts │ ├── test │ │ ├── demo │ │ │ ├── index.js │ │ │ ├── utils.js │ │ │ └── webpack.config.js │ │ └── index.test.ts │ └── tsconfig.json ├── preset-monorepo │ ├── .npmignore │ ├── .prettierrc │ ├── package.json │ ├── src │ │ ├── childProcess.ts │ │ ├── index.ts │ │ └── type │ │ │ └── options.d.ts │ └── tsconfig.json ├── preset-official │ ├── .npmignore │ ├── CHANGELOG.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── type.ts │ └── tsconfig.json ├── preset-wind-component │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── babel.ts │ │ ├── configWebpack.ts │ │ ├── const.ts │ │ ├── index.ts │ │ ├── rollup.ts │ │ ├── type │ │ │ ├── options.ts │ │ │ └── rollup-plugin.d.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── tslint.json ├── shared-utils │ ├── .gitignore │ ├── .npmignore │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── babelRequire.ts │ │ ├── debug.ts │ │ ├── env.ts │ │ ├── exit.ts │ │ ├── fork.ts │ │ ├── getPadLength.ts │ │ ├── index.ts │ │ ├── isDev.ts │ │ ├── isRelativePath.ts │ │ ├── logger.ts │ │ ├── pluginResolver.ts │ │ ├── resolveModule.ts │ │ ├── type.ts │ │ ├── watch.ts │ │ └── wind.ts │ ├── test │ │ └── index.test.ts │ └── tsconfig.json ├── stylelint-config-breezr │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ ├── package.json │ └── sc.js └── webpack-plugin-html-skeleton │ ├── CHANGELOG.md │ ├── package.json │ └── src │ ├── defaultTemplate.ejs │ └── index.js ├── pnpm-workspace.yaml └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | test/ 3 | tests/ 4 | lib/ -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-ali/typescript/react" 3 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # common 2 | 3 | .* 4 | !.*ignore 5 | !.*rc 6 | !.gitattributes 7 | !.aoneci.yml 8 | !.editorconfig 9 | 10 | # Logs 11 | logs 12 | *.log* 13 | 14 | # Runtime data 15 | pids 16 | *.pid 17 | *.seed 18 | *.pid.lock 19 | 20 | # Directory for instrumented libs generated by jscoverage/JSCover 21 | lib-cov 22 | 23 | # Coverage directory used by tools like istanbul 24 | coverage 25 | 26 | # Dependency directories 27 | bower_components 28 | node_modules/ 29 | jspm_packages/ 30 | 31 | # Compiled binary addons (https://nodejs.org/api/addons.html) 32 | build/Release 33 | lib 34 | dist 35 | !packages/babel-plugin-wind-rc/lib/ 36 | 37 | # TypeScript v1 declaration files 38 | typings/ 39 | 40 | # Output of 'npm pack' 41 | *.tgz 42 | 43 | yarn.lock 44 | examples 45 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Breezr 2 | 3 | ## 介绍 4 | ```console-toolkit``` 又名 (💨breezr 💨读作 [briːzr],来源是 breeze)。定位是可插拔的阿里云控制台构建系统,覆盖源码到构建部署的整个生命周期。在核心插件机制的配合下,支持各种业务和功能的扩展。 5 | 6 | ## 特性 7 | 8 | * 📦 开箱即用,内置了开发阿里云控制台的脚手架,dev server 和 构建器 9 | * 🏂 内置文件系统路由,用户不用关心路由配置 10 | * 🚀 高性能,内置长效缓存策略,一键 code splitting 11 | * 📎 完善的插件体系 12 | * 🔥 preset 机制,根据业务组合构建体系更方便 13 | 14 | ## 使用文档 15 | 16 | 新建目录 17 | 18 | ``` 19 | $ mkdir consoleApp && cd consoleApp 20 | ``` 21 | 22 | 初始化项目代码 23 | 24 | ``` 25 | $ npx breezr init 26 | ``` 27 | 28 | 调试项目 29 | 30 | ``` 31 | $ cd consoleApp 32 | $ npm run start 33 | ``` 34 | 35 | 构建项目 36 | ``` 37 | $ cd consoleApp 38 | $ npm run build 39 | ``` 40 | 41 | ## 贡献指南 42 | 43 | 参见[贡献指南](https://github.com/aliyun/alibabacloud-console-toolkit/blob/master/CONTRIBUTING.md) 44 | -------------------------------------------------------------------------------- /docs-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | doc-dist 2 | -------------------------------------------------------------------------------- /docs-sdk/.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | -------------------------------------------------------------------------------- /docs-sdk/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5" 4 | } 5 | -------------------------------------------------------------------------------- /docs-sdk/README.md: -------------------------------------------------------------------------------- 1 | # Breezr docs 2 | 3 | `/docs-sdk`文件夹脱离于仓库的 lerna 管理,它独立使用 pnpm 来管理。`/docs-sdk`下的所有包都处于一个 pnpm workspace 下。 4 | 5 | - 通过`pnpm install`命令来安装依赖,并 link 本地依赖。 6 | - 通过`npm run pub`脚本来发布所有尚未发布的包。注意不要自己使用`npm publish`来发布,因为 package.json 中包含一些特殊的`workspace:`语法(它们是用来[指导 pnpm link 本地依赖](https://pnpm.io/workspaces#workspace-protocol-workspace)的),因此**必须使用 pnpm 来发布**,pnpm 会在发布之前剔除掉特殊语法。 7 | - package.json 中还有一些方便的脚本,来更新依赖、更新版本号、同步 tnpm。这些你可以选择不用。 8 | -------------------------------------------------------------------------------- /docs-sdk/docs-consumer/develop-tips.md: -------------------------------------------------------------------------------- 1 | `npm run doc-dev` 启动本地开发服务器,构建当前 package 的文档。 2 | 3 | 因为文档工具依赖于这个 package,所以要先`npm run prepare`,否则打包的时候回提示找不到'@alicloud/console-toolkit-docs-consumer'。 4 | -------------------------------------------------------------------------------- /docs-sdk/docs-consumer/docs/breezr.config.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const globby = require("globby"); 3 | 4 | module.exports = { 5 | presets: [ 6 | [ 7 | // require.resolve("./lib"), 8 | require.resolve("@alicloud/console-toolkit-preset-docs"), 9 | { 10 | consoleOSId: "consumer-docs", 11 | getMarkdownEntries: () => { 12 | return [ 13 | { 14 | key: "doc", 15 | path: path.resolve(__dirname, "./document.md"), 16 | }, 17 | ]; 18 | }, 19 | }, 20 | ], 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /docs-sdk/docs-consumer/docs/document.md: -------------------------------------------------------------------------------- 1 | # @alicloud/console-toolkit-docs-consumer 2 | 3 | 从指定地址加载文档模块。 4 | 5 | 文档模块是由`@alicloud/console-toolkit-preset-docs`构建的。 6 | 7 | ## 使用方式 8 | 9 | 安装依赖: 10 | 11 | ```sh 12 | npm install -S @alicloud/console-toolkit-docs-consumer 13 | ``` 14 | 15 | 使用加载器: 16 | 17 | ```tsx 18 | import { EntryLoader } from "@alicloud/console-toolkit-docs-consumer"; 19 | 20 | export function App() { 21 | return ( 22 | 34 | ); 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | jest.config.js 3 | 4 | tsconfig.json 5 | tslint.json 6 | 7 | yarn.lock 8 | *.log 9 | 10 | src 11 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/README.md: -------------------------------------------------------------------------------- 1 | # breezr-docs 2 | 3 | breezr-docs 是一套基于 webpack 的文档、demo 开发环境。 4 | 5 | 将文档**分拆**到各自的项目维护,靠近各自的源代码,让它们可以随源代码的发布周期进行发布;开发官网站点时,又可以将各个仓库的文档**汇集**起来,给用户提供全面的文档。 6 | 7 | 一个文档项目,可以包含若干个 demo、markdown 文档;一个官网站点,可以从多个文档项目加载 demo、markdown 文档。 8 | 9 | 示例项目与文档: 10 | http://gitlab.alibaba-inc.com/sirui.csr/breezr-doc-demo 11 | 12 | 示例项目2 (在预发控制台加载本地开发的breezr-docs,从而可以在本地开发时直接调用后端接口,不需要绑定任何host): 13 | https://gitlab.alibaba-inc.com/xconsole/open-platform/blob/673749953499316d5c63ce0d727ce7a8597bb51d/packages/xconsole-open-template/README.md#L11 14 | 15 | 示例项目3 (通过绑定OneConsole预发hosts + 指定开发服务器的host为控制台域名 + 使用https 来实现本地直接调用后端接口) 16 | https://gitlab.alibaba-inc.com/wind/rc-rd-tree/blob/578faeab93700781ef083c1c3bb34e919b42b530/README.md#L52 17 | 18 | ## 维护信息 19 | 20 | `src/`下是插件代码(运行在node环境) 21 | `src2/`下是客户端代码(运行在浏览器环境) 22 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/getModifyPresetConfig.ts: -------------------------------------------------------------------------------- 1 | import type { BreezrPresetConfig as PresetOfficialConfig } from "@alicloud/console-toolkit-preset-official"; 2 | 3 | export function getModifyPresetConfig( 4 | presetOfficialConfigPath: string | undefined, 5 | info: { type: "main" | "deps" | "host"; isDev: boolean } 6 | ): (c: PresetOfficialConfig) => PresetOfficialConfig { 7 | if (typeof presetOfficialConfigPath !== "string") return (v) => v; 8 | const configFn = require(presetOfficialConfigPath); 9 | return (v) => { 10 | return configFn?.(v, info) || v; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/js-file-static-meta-loader.ts: -------------------------------------------------------------------------------- 1 | import { extract, parse } from "jest-docblock"; 2 | 3 | export default async function jsFileStaticMetaLoader( 4 | this: any, 5 | content: string 6 | ) { 7 | const meta = parse(extract(content)); 8 | return `export const staticMeta = ${JSON.stringify(meta)};`; 9 | } 10 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/md-file-static-meta-loader.ts: -------------------------------------------------------------------------------- 1 | import matter from "gray-matter"; 2 | 3 | export default async function mdFileStaticMetaLoader( 4 | this: any, 5 | content: string 6 | ) { 7 | const res = matter(content); 8 | return `export const staticMeta = ${JSON.stringify(res.data)};`; 9 | } 10 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/scripts/deps-build.ts: -------------------------------------------------------------------------------- 1 | import { Service } from "@alicloud/console-toolkit-core"; 2 | import { config } from "./configs/deps"; 3 | 4 | (async () => { 5 | console.log("开始构建微应用external依赖..."); 6 | const service = new Service({ 7 | cwd: process.cwd(), 8 | config: config({ isDev: false }), 9 | }); 10 | await service.run("build"); 11 | console.log("成功构建微应用external依赖"); 12 | })(); 13 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/scripts/deps-serve.ts: -------------------------------------------------------------------------------- 1 | import { Service } from "@alicloud/console-toolkit-core"; 2 | import getPort from "get-port"; 3 | import { config } from "./configs/deps"; 4 | 5 | getPort().then((port) => { 6 | console.log("开始serve微应用external依赖..."); 7 | const service = new Service({ 8 | cwd: process.cwd(), 9 | config: config({ port }), 10 | }); 11 | service.run("start"); 12 | service.on("onServerRunning", () => { 13 | console.log("serve构建微应用external依赖成功"); 14 | if (process.send) { 15 | process.send({ 16 | type: "server_started", 17 | port: port, 18 | }); 19 | } 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/scripts/host-serve.ts: -------------------------------------------------------------------------------- 1 | import { Service } from "@alicloud/console-toolkit-core"; 2 | import getPort from "get-port"; 3 | import { config } from "./configs/host"; 4 | 5 | getPort().then((port) => { 6 | console.log("开始serve本地开发的宿主应用"); 7 | const service = new Service({ 8 | cwd: process.cwd(), 9 | config: config({ port }), 10 | }); 11 | service.run("start"); 12 | service.on("onServerRunning", () => { 13 | console.log("serve本地开发的宿主应用成功"); 14 | if (process.send) { 15 | process.send({ 16 | type: "server_started", 17 | port: port, 18 | }); 19 | } 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src/type-info-loader/index.ts: -------------------------------------------------------------------------------- 1 | import { collectInterfaceInfo } from "./collectInterfaceInfo"; 2 | 3 | export default function typeInfoLoader(this: any, content: string) { 4 | const filePath = this.resourcePath; 5 | 6 | const info = collectInterfaceInfo(filePath); 7 | 8 | return `export default ${JSON.stringify(info)}`; 9 | } 10 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/BuildDeps/index.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | import deps from "/@externaled-deps"; 3 | 4 | import { 5 | registerExposedModule, 6 | mount 7 | } from "@alicloud/console-os-react-portal"; 8 | 9 | registerExposedModule("deps", deps); 10 | 11 | export default mount(() => null, document.getElementById("app")); 12 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/DemoContainer/CodeBlock.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { markdownComponents } from "@alicloud/console-toolkit-markdown-renderer"; 3 | 4 | export default props => { 5 | return ( 6 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/DemoContainer/FullView.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Dialog, { DialogProps } from "rc-dialog"; 3 | import "rc-dialog/assets/index.css"; 4 | import s from "./index.scoped.less"; 5 | 6 | interface FullViewProps extends DialogProps {} 7 | 8 | const FullView = ({ style, className, ...rest }: FullViewProps) => { 9 | return ( 10 | 16 | ); 17 | }; 18 | 19 | export default FullView; 20 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/DemoContainer/codemirror.less: -------------------------------------------------------------------------------- 1 | @import "~codemirror/lib/codemirror.css"; 2 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/DemoWrapper/index.tsx: -------------------------------------------------------------------------------- 1 | export default null; 2 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/Host.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | // @ts-ignore 3 | import env from "@alicloud/breezr-docs-environment"; 4 | 5 | import Overview from "./Overview"; 6 | 7 | const params = new URLSearchParams(window.location.search); 8 | const entryKeyFromURL = params.get("entryKey"); 9 | 10 | const Component: React.FC = props => { 11 | const [entryKey, setEntryKey] = useState(entryKeyFromURL); 12 | return ( 13 |
14 | { 17 | setEntryKey(newKey); 18 | params.set("entryKey", newKey); 19 | params.set("consoleOSId", env.consoleOSId); 20 | history.pushState(null, "", `?${params.toString()}`); 21 | }} 22 | /> 23 |
24 | ); 25 | }; 26 | 27 | export default Component; 28 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/Overview/index.scoped.less: -------------------------------------------------------------------------------- 1 | :global body { 2 | margin: 0px; 3 | } 4 | 5 | * { 6 | margin: 0; 7 | box-sizing: border-box; 8 | } 9 | 10 | .list { 11 | padding: 0 8px; 12 | padding-inline-start: 0; 13 | overflow: auto; 14 | max-height: 200px; 15 | } 16 | 17 | .item { 18 | display: inline-block; 19 | font-size: 18px; 20 | margin-top: 12px; 21 | cursor: pointer; 22 | width: 24%; 23 | user-select: none; 24 | } 25 | 26 | .item.active { 27 | color: #f06292; 28 | } 29 | 30 | .item:hover { 31 | color: red; 32 | } 33 | 34 | .widgetCtn { 35 | padding: 8px 12px; 36 | } 37 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/declare.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.less' 2 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/demoOpts.ts: -------------------------------------------------------------------------------- 1 | export default {}; 2 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |
11 |
12 |
13 | 14 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/index.tsx: -------------------------------------------------------------------------------- 1 | import "./set-public-path"; 2 | 3 | import { 4 | registerExposedModule, 5 | mount 6 | } from "@alicloud/console-os-react-portal"; 7 | 8 | import Loader, { entries } from "./Loader"; 9 | 10 | registerExposedModule("entries", entries); 11 | registerExposedModule("Overview", () => import("./Overview")); 12 | registerExposedModule("Loader", Loader); 13 | 14 | export default mount(Loader as any, document.getElementById("app")); 15 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/set-public-path.ts: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | import env from "@alicloud/breezr-docs-environment"; 3 | 4 | const actualPublicPath = env?.publicPath; 5 | 6 | if (!actualPublicPath) { 7 | console.error( 8 | "找不到env.publicPath!可能是加载器版本和构建器版本不兼容", 9 | env 10 | ); 11 | } 12 | 13 | // 解决dynamic import的public path问题 14 | __webpack_public_path__ = actualPublicPath || "/env-publicPath-not-found/"; 15 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/utils/copy.ts: -------------------------------------------------------------------------------- 1 | export function copy() { 2 | // let codeText = document.getElementById("code").innerText; 3 | // let input = document.createElement("textarea"); 4 | // input.value = codeText; 5 | // document.body.appendChild(input); 6 | // input.select(); 7 | // document.execCommand("Copy"); 8 | // input.style.display = "none"; 9 | } 10 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/src2/utils/expand.ts: -------------------------------------------------------------------------------- 1 | export function expand() { 2 | // if (document.getElementById("code").style.display === "block") { 3 | // document.getElementById("code").style.display = "none"; 4 | // } else { 5 | // document.getElementById("code").style.display = "block"; 6 | // } 7 | } 8 | -------------------------------------------------------------------------------- /docs-sdk/docs-provider/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "outDir": "lib", 6 | "lib": ["es2020", "dom"], 7 | "sourceMap": true, 8 | "rootDir": "src", 9 | "jsx": "react", 10 | "declaration": true, 11 | /* Strict Type-Checking Option */ 12 | "strict": true /* enable all strict type-checking options */, 13 | "noImplicitAny": false, 14 | "esModuleInterop": true, 15 | "skipLibCheck": true, 16 | /* Additional Checks */ 17 | "noUnusedLocals": true /* Report errors on unused locals. */ 18 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 19 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 20 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 21 | }, 22 | "exclude": ["test", "node_modules", "lib"] 23 | } 24 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-consumer/breezr.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 默认配置文件,一般来说你不需要更改此文件, 3 | * 如果需要构建相关,请参考下面链接的 自定义构建选项 4 | * https://wind.alibaba-inc.com/docs/quickstart/quick-start 5 | */ 6 | 7 | const config = { 8 | // 请自己加入 wepback-merge 自定义 9 | // webpack: (config) => (webpack-merge(config, {})) 10 | useTypescript: true 11 | }; 12 | 13 | module.exports = { 14 | presets: [["@alicloud/console-toolkit-preset-official", config]] 15 | }; 16 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-consumer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs-consumer-example", 3 | "version": "1.1.2", 4 | "description": "breezr example", 5 | "scripts": { 6 | "dev": "breezr start" 7 | }, 8 | "author": "csr632 <632882184@qq.com>", 9 | "license": "MIT", 10 | "private": true, 11 | "dependencies": { 12 | "@alicloud/console-toolkit-cli": "^1.2.0", 13 | "@alicloud/console-toolkit-core": "^1.1.0", 14 | "@alicloud/console-toolkit-docs-consumer": "workspace:*", 15 | "@alicloud/console-toolkit-preset-official": "^1.2.8" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-consumer/src/index.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/.gitignore: -------------------------------------------------------------------------------- 1 | doc-dist 2 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs-provider-example", 3 | "version": "1.1.3", 4 | "description": "breezr example", 5 | "scripts": { 6 | "clean": "rm -rf doc-dist", 7 | "dev": "npm run clean && npx breezr start", 8 | "build": "npm run clean && npx breezr build", 9 | "debug": "npm run clean && npx --node-options=--inspect-brk breezr start", 10 | "upload": "breezr upload", 11 | "upload:pre": "npm run upload -- --tag=pre" 12 | }, 13 | "author": "csr632 <632882184@qq.com>", 14 | "license": "MIT", 15 | "private": true, 16 | "dependencies": { 17 | "@alicloud/console-toolkit-cli": "^1.2.0", 18 | "@alicloud/console-toolkit-core": "^1.1.0", 19 | "@alicloud/console-toolkit-preset-docs": "workspace:*", 20 | "react": "^17.0.1", 21 | "react-dom": "^17.0.1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/resolveAppServePath.ts: -------------------------------------------------------------------------------- 1 | export default function resolveAppServePath(appId: string) { 2 | if (appId === "xconsole-demos") 3 | return `https://dev.g.alicdn.com/xconsole/demos/0.1.1/`; 4 | } 5 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/src/demos/demo1.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @title demo1 3 | * @describe demo1 description. 4 | * @myCustomOperation myCustomOperationContent 5 | */ 6 | 7 | import React from "react"; 8 | // @ts-ignore 9 | import * as testExternal from "test-external-module"; 10 | 11 | console.log("testExternal", testExternal); 12 | 13 | interface IProps {} 14 | 15 | const Demo1: React.FC = (props) => { 16 | return
demo1
; 17 | }; 18 | 19 | export default Demo1; 20 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/src/demos/demo2.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @title demo2 3 | * @describe demo2 description. 4 | * @canFullScreen 5 | */ 6 | 7 | import React from "react"; 8 | 9 | interface IProps {} 10 | 11 | const Demo2: React.FC = (props) => { 12 | return ( 13 |
14 | demo2 15 |

这是一个比较宽的demo,可以通过canFullScreen配置,开启全屏查看

16 |
17 | ); 18 | }; 19 | 20 | export default Demo2; 21 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/src/markdowns/document.md: -------------------------------------------------------------------------------- 1 | # @alicloud/console-toolkit-preset-docs 2 | 3 | `@alicloud/console-toolkit-preset-docs` 帮助你开发、发布**可复用的前端文档和 demo**,提高前端组件库、工具库的维护效率。 4 | 5 | ## 使用方式 6 | 7 | 安装依赖: 8 | 9 | ```sh 10 | npm install -D @alicloud/console-toolkit-cli @alicloud/console-toolkit-preset-docs 11 | npm install -D react react-dom typescript 12 | ``` 13 | 14 | ### 本地开发:预览所有应用 15 | 16 | ### 本地临时部署:可以被其他项目加载,方便在本地与加载者联调 17 | 18 | ### 生产构建:部署到 cdn 以后,可以被实际项目加载 19 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/src/markdowns/md2.md: -------------------------------------------------------------------------------- 1 | ## markdown fragment 2 | 3 | test **markdown** fragment. 4 | 5 | 6 | ### markdown fragment nested title 7 | 8 | content 9 | -------------------------------------------------------------------------------- /docs-sdk/examples/docs-provider/src/test-external-module-in-dev.ts: -------------------------------------------------------------------------------- 1 | export const testNamedExp = "value1"; 2 | 3 | export default { 4 | testDefaultExp: "value2" 5 | }; 6 | -------------------------------------------------------------------------------- /docs-sdk/examples/markdown-renderer/.gitignore: -------------------------------------------------------------------------------- 1 | .cache-loader -------------------------------------------------------------------------------- /docs-sdk/examples/markdown-renderer/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | jest.config.js 3 | 4 | tsconfig.json 5 | tslint.json 6 | 7 | yarn.lock 8 | *.log 9 | 10 | src 11 | -------------------------------------------------------------------------------- /docs-sdk/examples/markdown-renderer/breezr.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 默认配置文件,一般来说你不需要更改此文件, 3 | * 如果需要构建相关,请参考下面链接的 自定义构建选项 4 | * https://wind.alibaba-inc.com/docs/quickstart/quick-start 5 | */ 6 | 7 | const path = require("path"); 8 | 9 | const config = { 10 | // 请自己加入 wepback-merge 自定义 11 | webpack: config => { 12 | config.resolve.alias.react = path.resolve( 13 | __dirname, 14 | "./node_modules/react" 15 | ); 16 | config.resolve.alias["react-dom"] = path.resolve( 17 | __dirname, 18 | "./node_modules/react-dom" 19 | ); 20 | return config; 21 | }, 22 | useTypescript: true 23 | }; 24 | 25 | module.exports = { 26 | presets: [["@alicloud/console-toolkit-preset-official", config]] 27 | }; 28 | -------------------------------------------------------------------------------- /docs-sdk/examples/markdown-renderer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown-renderer-example", 3 | "version": "1.1.2", 4 | "description": "breezr example", 5 | "scripts": { 6 | "dev": "breezr start" 7 | }, 8 | "author": "csr632 <632882184@qq.com>", 9 | "license": "MIT", 10 | "private": true, 11 | "dependencies": { 12 | "@alicloud/console-components": "^1.4.0-alpha.11", 13 | "@alicloud/console-toolkit-cli": "^1.2.0", 14 | "@alicloud/console-toolkit-core": "^1.1.0", 15 | "@alicloud/console-toolkit-markdown-renderer": "workspace:*", 16 | "@alicloud/console-toolkit-preset-official": "^1.2.8", 17 | "react": "^17.0.1", 18 | "react-dom": "^17.0.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs-sdk/examples/markdown-renderer/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /docs-sdk/examples/markdown-renderer/src/index.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/alibabacloud-console-toolkit/89361b015e3dc79b76e52a4ece9be1b189d201c2/docs-sdk/examples/markdown-renderer/src/index.less -------------------------------------------------------------------------------- /docs-sdk/fusion-css-loader/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib -------------------------------------------------------------------------------- /docs-sdk/fusion-css-loader/fixture/index.js: -------------------------------------------------------------------------------- 1 | import "./mock-fusion.css?fusionPrefix=.my-prefix-&styleContainer=my-style-container"; 2 | import "./mock-var.css?fusionVarScope=.my-var-container"; 3 | import "./mock-custom-theme.css?myCustomFusionModify"; 4 | import "./mock-fusion-icon.css?fusionPrefix=.my-prefix-"; 5 | -------------------------------------------------------------------------------- /docs-sdk/fusion-css-loader/fixture/mock-var.css: -------------------------------------------------------------------------------- 1 | /* mock fusion css var https://unpkg.alipay.com/browse/@alife/theme-xconsole-v4@0.4.13/variables.css */ 2 | 3 | :root { 4 | /* ------------------------ color ------------------------ */ 5 | --color-brand1-1: #f7f9fa; 6 | --color-brand1-6: #0064c8; 7 | --color-brand1-9: #002850; 8 | --color-data1-1: #00dccd; 9 | --color-data1-2: #506fed; 10 | --color-data1-3: #ae66fc; 11 | } 12 | -------------------------------------------------------------------------------- /docs-sdk/fusion-css-loader/src/declare.d.ts: -------------------------------------------------------------------------------- 1 | declare module "semver"; 2 | declare module "loader-utils"; 3 | -------------------------------------------------------------------------------- /docs-sdk/markdown-renderer/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { "modules": false }], 4 | "@babel/preset-typescript", 5 | "@babel/preset-react" 6 | ], 7 | "plugins": ["@quickbaseoss/babel-plugin-styled-components-css-namespace"] 8 | } 9 | -------------------------------------------------------------------------------- /docs-sdk/markdown-renderer/TODO: -------------------------------------------------------------------------------- 1 | 用一个suspense包住最外层的文档,在嵌套的微应用还没加载好的时候,展示suspense fallback。当所有嵌套微应用加载好的时候,再一起展示整个文档。这样阅读体验更好,而且方便我们url hash anchor跳转。 2 | 3 | 本地开发使用 webpack-dev-middleware 和 webpack-hot-middleware 而不是webpack-dev-server,使得嵌套应用的更新能冒泡到页面刷新。 4 | -------------------------------------------------------------------------------- /docs-sdk/markdown-renderer/src/MarkdownComponents/code.tsx: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | import CodeBlock from './CodeBlock' 3 | 4 | export default { 5 | code: CodeBlock, 6 | inlinecode: styled.code` 7 | font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, 8 | monospace; 9 | font-size: 1em; 10 | background-color: rgba(27, 31, 35, 0.05); 11 | border-radius: 3px; 12 | margin: 0; 13 | font-size: 85%; 14 | padding: 0.2em 0.4em; 15 | word-wrap: normal; 16 | `, 17 | } 18 | -------------------------------------------------------------------------------- /docs-sdk/markdown-renderer/src/utils/getScrollParent.ts: -------------------------------------------------------------------------------- 1 | // https://gist.github.com/twxia/bb20843c495a49644be6ea3804c0d775#gistcomment-2899112 2 | 3 | const REGEXP_SCROLL_PARENT = /^(visible|hidden)/ 4 | 5 | const getScrollParent = el => 6 | !(el instanceof HTMLElement) || typeof window.getComputedStyle !== 'function' 7 | ? null 8 | : el.scrollHeight >= el.clientHeight && 9 | !REGEXP_SCROLL_PARENT.test( 10 | window.getComputedStyle(el).overflowY || 'visible' 11 | ) 12 | ? el 13 | : getScrollParent(el.parentElement) || window 14 | 15 | export default getScrollParent 16 | -------------------------------------------------------------------------------- /docs-sdk/markdown-renderer/src/utils/useScrollToAnchor.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useState } from "react"; 2 | 3 | export function useScrollToAnchor(ctnRef: React.RefObject) { 4 | // 当成功加载内部微应用的时候,根据url hash,滚动到对应的元素 5 | const [alreadyScrollToHashAnchor, setAlreadyScrollToHashAnchor] = useState( 6 | false 7 | ); 8 | const scrollToAnchor = useCallback(() => { 9 | if (!ctnRef.current) return; 10 | if (alreadyScrollToHashAnchor) return; 11 | const hash = window.location.hash; 12 | if (!hash) return; 13 | let el; 14 | try { 15 | el = ctnRef.current.querySelector(decodeURIComponent(hash)); 16 | } catch (error) {} 17 | if (el) { 18 | setAlreadyScrollToHashAnchor(true); 19 | window.location.hash = "#"; 20 | window.location.hash = hash; 21 | } 22 | }, [alreadyScrollToHashAnchor]); 23 | return scrollToAnchor; 24 | } 25 | -------------------------------------------------------------------------------- /docs-sdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "root", 3 | "private": true, 4 | "version": "1.0.0", 5 | "license": "MIT", 6 | "scripts": { 7 | "ver": "pnpm recursive --filter !{examples} --filter !root --filter [origin/master] exec -- npm version", 8 | "ver:p": "npm run ver -- patch", 9 | "ver:mi": "npm run ver -- minor", 10 | "pub": "pnpm publish --filter !{examples}", 11 | "update-deps": "pnpm --recursive update -i -L", 12 | "sync": "pnpm recursive --filter !{examples} --filter !root --no-sort --workspace-concurrency=Infinity exec -- tnpm sync" 13 | }, 14 | "devDependencies": { 15 | "prettier": "^2.2.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs-sdk/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "docs-provider" 3 | - "docs-consumer" 4 | - "fusion-css-loader" 5 | - "markdown-renderer" 6 | - "shared" 7 | - "examples/**" 8 | - "site" 9 | -------------------------------------------------------------------------------- /docs-sdk/shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@alicloud/console-toolkit-docs-shared", 3 | "version": "1.0.6", 4 | "main": "lib/index.js", 5 | "license": "MIT", 6 | "publishConfig": { 7 | "access": "public" 8 | }, 9 | "scripts": { 10 | "watch": "tsc -w", 11 | "prepare": "tsc" 12 | }, 13 | "devDependencies": { 14 | "@types/react": "^17.0.0", 15 | "typescript": "^4.1.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs-sdk/shared/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./types"; 2 | -------------------------------------------------------------------------------- /docs-sdk/site/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /docs-sdk/site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "site", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "dependencies": { 11 | "next": "^10.0.5", 12 | "react": "^17.0.1", 13 | "react-dom": "^17.0.1" 14 | }, 15 | "devDependencies": { 16 | "typescript": "^4.1.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs-sdk/site/pages/about.tsx: -------------------------------------------------------------------------------- 1 | function About() { 2 | return
About
3 | } 4 | 5 | export default About 6 | -------------------------------------------------------------------------------- /docs-sdk/site/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "strict": false, 12 | "forceConsistentCasingInFileNames": true, 13 | "noEmit": true, 14 | "esModuleInterop": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "jsx": "preserve" 20 | }, 21 | "include": [ 22 | "next-env.d.ts", 23 | "**/*.ts", 24 | "**/*.tsx" 25 | ], 26 | "exclude": [ 27 | "node_modules" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /docs/quick.md: -------------------------------------------------------------------------------- 1 | # 快速上手 2 | 3 | ## 基础环境准备 4 | 5 | ### node 6 | 7 | 先安装 Node 环境, 推荐保证是 8.10.x 以上. 请访问 https://nodejs.org/en/download/ 来根据操作系统和环境安装 Node.js 8 | 9 | ```bash 10 | # mac 11 | $ brew install node 12 | $ node -v 13 | ``` 14 | 15 | ### 项目脚手架 16 | 17 | ```bash 18 | $ mkdir consoleApp && cd consoleApp 19 | ``` 20 | 21 | 初始化项目代码 22 | 23 | ```bash 24 | $ npx breezr init 25 | ``` 26 | 27 | ### 调试项目 28 | 29 | 启动本地调试服务器 30 | 31 | ```bash 32 | $ cd consoleApp 33 | $ npm run start 34 | ``` 35 | 36 | 然后在 在 http://localhost:3333, 可以访问到当前的页面. 37 | 38 | ### 构建项目 39 | 40 | npm run build 执行整个项目的构建 41 | 42 | ```bash 43 | $ cd consoleApp 44 | $ npm run build 45 | ``` -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: [ 5 | '**/tests/**/*.ts?(x)', 6 | '**/?(*.)+(spec|test).ts?(x)', 7 | ], 8 | testPathIgnorePatterns: [ 9 | '/node_modules/', 10 | '/tests/fixtures/', 11 | '/templates' 12 | ], 13 | transformIgnorePatterns: [ 14 | '/node_modules/' 15 | ], 16 | coverageDirectory: "./coverage", 17 | coverageReporters: ["json", "text", "lcov", "clover"] 18 | }; -------------------------------------------------------------------------------- /packages/babel-plugin-transform-loadable-component/__tests__/fixtures/complex-normal/actual.js: -------------------------------------------------------------------------------- 1 | import __React$$Loadable__ from 'react-loadable'; 2 | import React from 'react'; 3 | import { Switch, Route, Redirect } from 'dva/router'; 4 | import AppLayout from '@aliwind/rc-app-layout'; 5 | import Nav from '../../components/Nav'; 6 | import Instance from '../Instance' 7 | import Monitor from '../Monitor'; 8 | 9 | const App = () => }> 10 | 11 | (
loading
)} __async /> 12 | 13 | 14 |
15 |
; 16 | 17 | export default App; -------------------------------------------------------------------------------- /packages/babel-plugin-transform-loadable-component/__tests__/fixtures/complex-normal/expected.js: -------------------------------------------------------------------------------- 1 | import __React$$Loadable__ from 'react-loadable'; 2 | import React from 'react'; 3 | import { Switch, Route, Redirect } from 'dva/router'; 4 | import AppLayout from '@aliwind/rc-app-layout'; 5 | import Nav from '../../components/Nav'; 6 | 7 | import Monitor from '../Monitor'; 8 | 9 | const App = () => }> 10 | 11 | import('../Instance'), 13 | loading: () =>
loading
14 | })} /> 15 | 16 | 17 |
18 |
; 19 | 20 | export default App; -------------------------------------------------------------------------------- /packages/babel-plugin-transform-loadable-component/__tests__/fixtures/normal/actual.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Component from 'react-component' 3 | import { Button } from '@aliwind' 4 | 5 | const MyComponent = () => ( 6 | 7 | ) 8 | 9 | export default MyComponent 10 | -------------------------------------------------------------------------------- /packages/babel-plugin-wind/__tests__/fixtures/multi-import-specifiers/expected.js: -------------------------------------------------------------------------------- 1 | import Icon from "@aliwind/lib/icon"; 2 | import Button from "@aliwind/lib/button"; 3 | 4 | const MyComponent = () => ; 7 | 8 | export default MyComponent; 9 | -------------------------------------------------------------------------------- /packages/babel-plugin-wind/__tests__/fixtures/single-import-specifier/actual.js: -------------------------------------------------------------------------------- 1 | import { Button } from '@aliwind' 2 | 3 | const MyComponent = () => ( 4 |