@modern-js/module-tools 2.0.0-beta.3 → 2.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +331 -211
- package/bin/modern.js +1 -0
- package/compiled/@babel/code-frame/index.d.ts +1 -0
- package/compiled/@babel/code-frame/index.js +1 -0
- package/compiled/@babel/code-frame/license +22 -0
- package/compiled/@babel/code-frame/package.json +1 -0
- package/compiled/@babel/generator/index.d.ts +1 -0
- package/compiled/@babel/generator/index.js +1 -0
- package/compiled/@babel/generator/license +22 -0
- package/compiled/@babel/generator/package.json +1 -0
- package/compiled/@babel/helper-validator-identifier/index.d.ts +1 -0
- package/compiled/@babel/helper-validator-identifier/index.js +1 -0
- package/compiled/@babel/helper-validator-identifier/license +22 -0
- package/compiled/@babel/helper-validator-identifier/package.json +1 -0
- package/compiled/@babel/highlight/index.d.ts +1 -0
- package/compiled/@babel/highlight/index.js +1 -0
- package/compiled/@babel/highlight/license +22 -0
- package/compiled/@babel/highlight/package.json +1 -0
- package/compiled/@babel/parser/@babel/types/lib/index-legacy.d.ts +2742 -0
- package/compiled/@babel/parser/index.js +1 -0
- package/compiled/@babel/parser/license +19 -0
- package/compiled/@babel/parser/package.json +1 -0
- package/compiled/@babel/parser/typings/babel-parser.d.ts +214 -0
- package/compiled/@babel/template/index.d.ts +1 -0
- package/compiled/@babel/template/index.js +1 -0
- package/compiled/@babel/template/license +22 -0
- package/compiled/@babel/template/package.json +1 -0
- package/compiled/@babel/traverse/index.d.ts +1199 -0
- package/compiled/@babel/traverse/index.js +1 -0
- package/compiled/@babel/traverse/license +22 -0
- package/compiled/@babel/traverse/package.json +1 -0
- package/compiled/@babel/types/index.js +1 -0
- package/compiled/@babel/types/lib/index-legacy.d.ts +2732 -0
- package/compiled/@babel/types/license +22 -0
- package/compiled/@babel/types/package.json +1 -0
- package/compiled/@rollup/plugin-json/@rollup/pluginutils/types/index.d.ts +86 -0
- package/compiled/@rollup/plugin-json/estree/index.d.ts +548 -0
- package/compiled/@rollup/plugin-json/index.js +1 -0
- package/compiled/@rollup/plugin-json/license +21 -0
- package/compiled/@rollup/plugin-json/package.json +1 -0
- package/compiled/@rollup/plugin-json/rollup/dist/rollup.d.ts +948 -0
- package/compiled/@rollup/plugin-json/types/index.d.ts +41 -0
- package/compiled/find-up/index.d.ts +138 -0
- package/compiled/find-up/index.js +1 -0
- package/compiled/find-up/license +9 -0
- package/compiled/find-up/locate-path/index.d.ts +83 -0
- package/compiled/find-up/package.json +1 -0
- package/compiled/less/index.d.ts +282 -0
- package/compiled/less/index.js +1 -0
- package/compiled/less/package.json +1 -0
- package/compiled/normalize-path/index.d.ts +8 -0
- package/compiled/normalize-path/index.js +8 -0
- package/compiled/normalize-path/license +21 -0
- package/compiled/normalize-path/package.json +1 -0
- package/compiled/p-map/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
- package/compiled/p-map/cacheable-lookup/index.d.ts +139 -0
- package/compiled/p-map/cacheable-request/index.d.ts +137 -0
- package/compiled/p-map/got/dist/source/as-promise/index.d.ts +3 -0
- package/compiled/p-map/got/dist/source/as-promise/types.d.ts +256 -0
- package/compiled/p-map/got/dist/source/core/index.d.ts +1124 -0
- package/compiled/p-map/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
- package/compiled/p-map/got/dist/source/core/utils/options-to-url.d.ts +14 -0
- package/compiled/p-map/got/dist/source/core/utils/timed-out.d.ts +29 -0
- package/compiled/p-map/got/dist/source/index.d.ts +4 -0
- package/compiled/p-map/got/dist/source/types.d.ts +344 -0
- package/compiled/p-map/http-cache-semantics/index.d.ts +170 -0
- package/compiled/p-map/index.d.ts +67 -0
- package/compiled/p-map/index.js +1 -0
- package/compiled/p-map/keyv/src/index.d.ts +104 -0
- package/compiled/p-map/license +9 -0
- package/compiled/p-map/p-cancelable/index.d.ts +176 -0
- package/compiled/p-map/package.json +1 -0
- package/compiled/p-map/responselike/index.d.ts +34 -0
- package/compiled/postcss-custom-properties/index.d.ts +1 -0
- package/compiled/postcss-custom-properties/index.js +1 -0
- package/compiled/postcss-custom-properties/package.json +1 -0
- package/compiled/postcss-flexbugs-fixes/index.d.ts +1 -0
- package/compiled/postcss-flexbugs-fixes/index.js +1 -0
- package/compiled/postcss-flexbugs-fixes/license +20 -0
- package/compiled/postcss-flexbugs-fixes/package.json +1 -0
- package/compiled/postcss-font-variant/index.d.ts +1 -0
- package/compiled/postcss-font-variant/index.js +1 -0
- package/compiled/postcss-font-variant/license +20 -0
- package/compiled/postcss-font-variant/package.json +1 -0
- package/compiled/postcss-initial/index.d.ts +1 -0
- package/compiled/postcss-initial/index.js +1 -0
- package/compiled/postcss-initial/license +20 -0
- package/compiled/postcss-initial/package.json +1 -0
- package/compiled/postcss-media-minmax/index.d.ts +1 -0
- package/compiled/postcss-media-minmax/index.js +1 -0
- package/compiled/postcss-media-minmax/license +22 -0
- package/compiled/postcss-media-minmax/package.json +1 -0
- package/compiled/postcss-nesting/index.d.ts +1 -0
- package/compiled/postcss-nesting/index.js +2 -0
- package/compiled/postcss-nesting/package.json +1 -0
- package/compiled/postcss-page-break/index.d.ts +1 -0
- package/compiled/postcss-page-break/index.js +1 -0
- package/compiled/postcss-page-break/license +20 -0
- package/compiled/postcss-page-break/package.json +1 -0
- package/compiled/postcss-value-parser/index.d.ts +1 -0
- package/compiled/postcss-value-parser/index.js +1 -0
- package/compiled/postcss-value-parser/license +22 -0
- package/compiled/postcss-value-parser/package.json +1 -0
- package/compiled/rollup/fsevents.node +0 -0
- package/compiled/rollup/index.js +82 -0
- package/compiled/rollup/package.json +1 -0
- package/compiled/rollup/types/rollup.d.ts +948 -0
- package/compiled/rollup-plugin-dts/dist/rollup-plugin-dts.d.ts +21 -0
- package/compiled/rollup-plugin-dts/index.js +1 -0
- package/compiled/rollup-plugin-dts/package.json +1 -0
- package/compiled/rollup-plugin-dts/rollup/dist/rollup.d.ts +948 -0
- package/compiled/sass/index.js +1 -0
- package/compiled/sass/license +1619 -0
- package/compiled/sass/package.json +1 -0
- package/compiled/sass/types/compile.d.ts +152 -0
- package/compiled/sass/types/exception.d.ts +41 -0
- package/compiled/sass/types/importer.d.ts +294 -0
- package/compiled/sass/types/index.d.ts +80 -0
- package/compiled/sass/types/legacy/exception.d.ts +54 -0
- package/compiled/sass/types/legacy/function.d.ts +756 -0
- package/compiled/sass/types/legacy/importer.d.ts +168 -0
- package/compiled/sass/types/legacy/options.d.ts +642 -0
- package/compiled/sass/types/legacy/plugin_this.d.ts +73 -0
- package/compiled/sass/types/legacy/render.d.ts +139 -0
- package/compiled/sass/types/logger/index.d.ts +94 -0
- package/compiled/sass/types/logger/source_location.d.ts +21 -0
- package/compiled/sass/types/logger/source_span.d.ts +34 -0
- package/compiled/sass/types/options.d.ts +435 -0
- package/compiled/sass/types/util/promise_or.d.ts +17 -0
- package/compiled/sass/types/value/argument_list.d.ts +47 -0
- package/compiled/sass/types/value/boolean.d.ts +29 -0
- package/compiled/sass/types/value/color.d.ts +107 -0
- package/compiled/sass/types/value/function.d.ts +22 -0
- package/compiled/sass/types/value/index.d.ts +173 -0
- package/compiled/sass/types/value/list.d.ts +54 -0
- package/compiled/sass/types/value/map.d.ts +41 -0
- package/compiled/sass/types/value/number.d.ts +305 -0
- package/compiled/sass/types/value/string.d.ts +84 -0
- package/compiled/signal-exit/index.d.ts +24 -0
- package/compiled/signal-exit/index.js +1 -0
- package/compiled/signal-exit/package.json +1 -0
- package/dist/builder/build.d.ts +23 -0
- package/dist/builder/build.js +269 -0
- package/dist/builder/build.js.map +1 -0
- package/dist/builder/clear.d.ts +3 -0
- package/dist/builder/clear.js +67 -0
- package/dist/builder/clear.js.map +1 -0
- package/dist/builder/copy.d.ts +11 -0
- package/dist/builder/copy.js +196 -0
- package/dist/builder/copy.js.map +1 -0
- package/dist/builder/dts/index.d.ts +2 -0
- package/dist/builder/dts/index.js +32 -0
- package/dist/builder/dts/index.js.map +1 -0
- package/dist/builder/dts/rollup.d.ts +17 -0
- package/dist/builder/dts/rollup.js +167 -0
- package/dist/builder/dts/rollup.js.map +1 -0
- package/dist/builder/dts/tsc.d.ts +3 -0
- package/dist/builder/dts/tsc.js +153 -0
- package/dist/builder/dts/tsc.js.map +1 -0
- package/dist/builder/index.d.ts +8 -0
- package/dist/builder/index.js +116 -0
- package/dist/builder/index.js.map +1 -0
- package/dist/builder/platform.d.ts +4 -0
- package/dist/builder/platform.js +132 -0
- package/dist/builder/platform.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +95 -0
- package/dist/cli.js.map +1 -0
- package/dist/command.d.ts +7 -0
- package/dist/command.js +164 -0
- package/dist/command.js.map +1 -0
- package/dist/config/defineConfig.d.ts +2 -0
- package/dist/config/defineConfig.js +29 -0
- package/dist/config/defineConfig.js.map +1 -0
- package/dist/config/normalize.d.ts +17 -0
- package/dist/config/normalize.js +168 -0
- package/dist/config/normalize.js.map +1 -0
- package/dist/config/schema.d.ts +641 -0
- package/dist/config/schema.js +215 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/constants/build-presets.d.ts +81 -0
- package/dist/constants/build-presets.js +236 -0
- package/dist/constants/build-presets.js.map +1 -0
- package/dist/constants/build.d.ts +5 -0
- package/dist/constants/build.js +78 -0
- package/dist/constants/build.js.map +1 -0
- package/dist/constants/colors.d.ts +4 -0
- package/dist/constants/colors.js +35 -0
- package/dist/constants/colors.js.map +1 -0
- package/dist/constants/dts.d.ts +4 -0
- package/dist/constants/dts.js +52 -0
- package/dist/constants/dts.js.map +1 -0
- package/dist/constants/file.d.ts +3 -0
- package/dist/constants/file.js +35 -0
- package/dist/constants/file.js.map +1 -0
- package/dist/constants/legacy-build-presets.d.ts +13 -0
- package/dist/constants/legacy-build-presets.js +198 -0
- package/dist/constants/legacy-build-presets.js.map +1 -0
- package/dist/constants/log.d.ts +8 -0
- package/dist/constants/log.js +43 -0
- package/dist/constants/log.js.map +1 -0
- package/dist/dev.d.ts +10 -0
- package/dist/dev.js +129 -0
- package/dist/dev.js.map +1 -0
- package/dist/{types/features/build/error.d.ts → error.d.ts} +1 -1
- package/dist/error.js +148 -0
- package/dist/error.js.map +1 -0
- package/dist/hooks/build.d.ts +22 -0
- package/dist/hooks/build.js +39 -0
- package/dist/hooks/build.js.map +1 -0
- package/dist/hooks/dev.d.ts +12 -0
- package/dist/hooks/dev.js +37 -0
- package/dist/hooks/dev.js.map +1 -0
- package/dist/hooks/index.d.ts +29 -0
- package/dist/hooks/index.js +46 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/misc.d.ts +5 -0
- package/dist/hooks/misc.js +33 -0
- package/dist/hooks/misc.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/{types/locale → locale}/en.d.ts +0 -0
- package/dist/locale/en.js +51 -0
- package/dist/locale/en.js.map +1 -0
- package/dist/{types/locale → locale}/index.d.ts +0 -0
- package/dist/locale/index.js +39 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/{types/locale → locale}/zh.d.ts +0 -0
- package/dist/locale/zh.js +51 -0
- package/dist/locale/zh.js.map +1 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +55 -0
- package/dist/plugins.js.map +1 -0
- package/dist/types/color.d.ts +1 -0
- package/dist/types/color.js +17 -0
- package/dist/types/color.js.map +1 -0
- package/dist/types/command.d.ts +11 -0
- package/dist/types/command.js +17 -0
- package/dist/types/command.js.map +1 -0
- package/dist/types/config/index.d.ts +92 -0
- package/dist/types/config/index.js +19 -0
- package/dist/types/config/index.js.map +1 -0
- package/dist/types/config/style.d.ts +12 -0
- package/dist/types/config/style.js +17 -0
- package/dist/types/config/style.js.map +1 -0
- package/dist/types/context.d.ts +5 -0
- package/dist/types/context.js +17 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/copy.d.ts +15 -0
- package/dist/types/copy.js +17 -0
- package/dist/types/copy.js.map +1 -0
- package/dist/types/{utils/tsconfig.d.ts → dts.d.ts} +11 -3
- package/dist/types/dts.js +17 -0
- package/dist/types/dts.js.map +1 -0
- package/dist/types/hooks.d.ts +25 -0
- package/dist/types/hooks.js +17 -0
- package/dist/types/hooks.js.map +1 -0
- package/dist/types/index.d.ts +17 -6
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utils.d.ts +7 -0
- package/dist/types/utils.js +17 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/utils/builder.d.ts +8 -0
- package/dist/utils/builder.js +104 -0
- package/dist/utils/builder.js.map +1 -0
- package/dist/utils/config.d.ts +6 -0
- package/dist/utils/config.js +167 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/context.d.ts +7 -0
- package/dist/utils/context.js +60 -0
- package/dist/utils/context.js.map +1 -0
- package/dist/utils/dts.d.ts +14 -0
- package/dist/utils/dts.js +186 -0
- package/dist/utils/dts.js.map +1 -0
- package/dist/utils/input.d.ts +16 -0
- package/dist/utils/input.js +113 -0
- package/dist/utils/input.js.map +1 -0
- package/dist/utils/language.d.ts +2 -0
- package/dist/utils/language.js +68 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/libuild-plugins.d.ts +6 -0
- package/dist/utils/libuild-plugins.js +83 -0
- package/dist/utils/libuild-plugins.js.map +1 -0
- package/dist/utils/log.d.ts +2 -0
- package/dist/utils/log.js +68 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/onExit.d.ts +1 -0
- package/dist/utils/onExit.js +63 -0
- package/dist/utils/onExit.js.map +1 -0
- package/dist/utils/path.d.ts +1 -0
- package/dist/utils/path.js +59 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/style.d.ts +31 -0
- package/dist/utils/style.js +129 -0
- package/dist/utils/style.js.map +1 -0
- package/dist/{types/utils/tspaths-transform/index.d.ts → utils/tspaths-transform.d.ts} +0 -0
- package/dist/utils/tspaths-transform.js +119 -0
- package/dist/utils/tspaths-transform.js.map +1 -0
- package/package.json +43 -72
- package/dist/js/modern/cli/build.js +0 -11
- package/dist/js/modern/cli/dev.js +0 -11
- package/dist/js/modern/cli/index.js +0 -3
- package/dist/js/modern/cli/new.js +0 -13
- package/dist/js/modern/commands/build.js +0 -69
- package/dist/js/modern/commands/dev.js +0 -43
- package/dist/js/modern/commands/index.js +0 -2
- package/dist/js/modern/features/build/build-platform.js +0 -69
- package/dist/js/modern/features/build/bundle/index.js +0 -9
- package/dist/js/modern/features/build/bundle/runRollup.js +0 -136
- package/dist/js/modern/features/build/bundle/runSpeedy.js +0 -176
- package/dist/js/modern/features/build/bundleless/copy-assets.js +0 -75
- package/dist/js/modern/features/build/bundleless/generator-dts/index.js +0 -106
- package/dist/js/modern/features/build/bundleless/generator-dts/utils.js +0 -94
- package/dist/js/modern/features/build/bundleless/index.js +0 -21
- package/dist/js/modern/features/build/bundleless/runBabel.js +0 -242
- package/dist/js/modern/features/build/bundleless/style.js +0 -241
- package/dist/js/modern/features/build/constants.js +0 -98
- package/dist/js/modern/features/build/error.js +0 -127
- package/dist/js/modern/features/build/index.js +0 -117
- package/dist/js/modern/features/build/legacy-constants.js +0 -103
- package/dist/js/modern/features/build/logger/index.js +0 -2
- package/dist/js/modern/features/build/logger/logText.js +0 -56
- package/dist/js/modern/features/build/logger/loggerManager.js +0 -93
- package/dist/js/modern/features/build/normalize.js +0 -277
- package/dist/js/modern/features/build/types.js +0 -0
- package/dist/js/modern/features/build/utils.js +0 -92
- package/dist/js/modern/features/dev/index.js +0 -47
- package/dist/js/modern/hooks/build.js +0 -20
- package/dist/js/modern/hooks/dev.js +0 -14
- package/dist/js/modern/hooks/index.js +0 -15
- package/dist/js/modern/index.js +0 -63
- package/dist/js/modern/locale/en.js +0 -25
- package/dist/js/modern/locale/index.js +0 -10
- package/dist/js/modern/locale/zh.js +0 -25
- package/dist/js/modern/schema/build-config.js +0 -117
- package/dist/js/modern/schema/index.js +0 -4
- package/dist/js/modern/schema/output.js +0 -45
- package/dist/js/modern/schema/source.js +0 -7
- package/dist/js/modern/schema/tools.js +0 -6
- package/dist/js/modern/schema/types.js +0 -0
- package/dist/js/modern/types.js +0 -0
- package/dist/js/modern/utils/babel.js +0 -84
- package/dist/js/modern/utils/color.js +0 -2
- package/dist/js/modern/utils/constants.js +0 -3
- package/dist/js/modern/utils/copy.js +0 -70
- package/dist/js/modern/utils/init-env.js +0 -13
- package/dist/js/modern/utils/json.js +0 -13
- package/dist/js/modern/utils/language.js +0 -6
- package/dist/js/modern/utils/logger.js +0 -96
- package/dist/js/modern/utils/readline.js +0 -17
- package/dist/js/modern/utils/tsconfig.js +0 -13
- package/dist/js/modern/utils/tspaths-transform/constants.js +0 -5
- package/dist/js/modern/utils/tspaths-transform/index.js +0 -113
- package/dist/js/modern/utils/tspaths-transform/utils.js +0 -18
- package/dist/js/modern/utils/valide.js +0 -26
- package/dist/js/node/cli/build.js +0 -18
- package/dist/js/node/cli/dev.js +0 -18
- package/dist/js/node/cli/index.js +0 -38
- package/dist/js/node/cli/new.js +0 -20
- package/dist/js/node/commands/build.js +0 -80
- package/dist/js/node/commands/dev.js +0 -52
- package/dist/js/node/commands/index.js +0 -19
- package/dist/js/node/features/build/build-platform.js +0 -76
- package/dist/js/node/features/build/bundle/index.js +0 -17
- package/dist/js/node/features/build/bundle/runRollup.js +0 -145
- package/dist/js/node/features/build/bundle/runSpeedy.js +0 -186
- package/dist/js/node/features/build/bundleless/copy-assets.js +0 -84
- package/dist/js/node/features/build/bundleless/generator-dts/index.js +0 -114
- package/dist/js/node/features/build/bundleless/generator-dts/utils.js +0 -105
- package/dist/js/node/features/build/bundleless/index.js +0 -29
- package/dist/js/node/features/build/bundleless/runBabel.js +0 -255
- package/dist/js/node/features/build/bundleless/style.js +0 -254
- package/dist/js/node/features/build/constants.js +0 -116
- package/dist/js/node/features/build/error.js +0 -139
- package/dist/js/node/features/build/index.js +0 -128
- package/dist/js/node/features/build/legacy-constants.js +0 -111
- package/dist/js/node/features/build/logger/index.js +0 -27
- package/dist/js/node/features/build/logger/logText.js +0 -66
- package/dist/js/node/features/build/logger/loggerManager.js +0 -95
- package/dist/js/node/features/build/normalize.js +0 -288
- package/dist/js/node/features/build/types.js +0 -0
- package/dist/js/node/features/build/utils.js +0 -107
- package/dist/js/node/features/dev/index.js +0 -56
- package/dist/js/node/hooks/build.js +0 -32
- package/dist/js/node/hooks/dev.js +0 -24
- package/dist/js/node/hooks/index.js +0 -36
- package/dist/js/node/index.js +0 -83
- package/dist/js/node/locale/en.js +0 -32
- package/dist/js/node/locale/index.js +0 -17
- package/dist/js/node/locale/zh.js +0 -32
- package/dist/js/node/schema/build-config.js +0 -126
- package/dist/js/node/schema/index.js +0 -11
- package/dist/js/node/schema/output.js +0 -52
- package/dist/js/node/schema/source.js +0 -14
- package/dist/js/node/schema/tools.js +0 -13
- package/dist/js/node/schema/types.js +0 -0
- package/dist/js/node/types.js +0 -0
- package/dist/js/node/utils/babel.js +0 -93
- package/dist/js/node/utils/color.js +0 -9
- package/dist/js/node/utils/constants.js +0 -11
- package/dist/js/node/utils/copy.js +0 -79
- package/dist/js/node/utils/init-env.js +0 -20
- package/dist/js/node/utils/json.js +0 -20
- package/dist/js/node/utils/language.js +0 -12
- package/dist/js/node/utils/logger.js +0 -107
- package/dist/js/node/utils/readline.js +0 -25
- package/dist/js/node/utils/tsconfig.js +0 -21
- package/dist/js/node/utils/tspaths-transform/constants.js +0 -12
- package/dist/js/node/utils/tspaths-transform/index.js +0 -123
- package/dist/js/node/utils/tspaths-transform/utils.js +0 -25
- package/dist/js/node/utils/valide.js +0 -34
- package/dist/types/cli/build.d.ts +0 -3
- package/dist/types/cli/dev.d.ts +0 -3
- package/dist/types/cli/index.d.ts +0 -3
- package/dist/types/cli/new.d.ts +0 -2
- package/dist/types/commands/build.d.ts +0 -17
- package/dist/types/commands/dev.d.ts +0 -5
- package/dist/types/commands/index.d.ts +0 -2
- package/dist/types/features/build/build-platform.d.ts +0 -7
- package/dist/types/features/build/bundle/index.d.ts +0 -3
- package/dist/types/features/build/bundle/runRollup.d.ts +0 -3
- package/dist/types/features/build/bundle/runSpeedy.d.ts +0 -10
- package/dist/types/features/build/bundleless/copy-assets.d.ts +0 -3
- package/dist/types/features/build/bundleless/generator-dts/index.d.ts +0 -3
- package/dist/types/features/build/bundleless/generator-dts/utils.d.ts +0 -21
- package/dist/types/features/build/bundleless/index.d.ts +0 -4
- package/dist/types/features/build/bundleless/runBabel.d.ts +0 -32
- package/dist/types/features/build/bundleless/style.d.ts +0 -25
- package/dist/types/features/build/constants.d.ts +0 -18
- package/dist/types/features/build/index.d.ts +0 -12
- package/dist/types/features/build/legacy-constants.d.ts +0 -8
- package/dist/types/features/build/logger/index.d.ts +0 -2
- package/dist/types/features/build/logger/logText.d.ts +0 -39
- package/dist/types/features/build/logger/loggerManager.d.ts +0 -40
- package/dist/types/features/build/normalize.d.ts +0 -19
- package/dist/types/features/build/types.d.ts +0 -15
- package/dist/types/features/build/utils.d.ts +0 -36
- package/dist/types/features/dev/index.d.ts +0 -9
- package/dist/types/hooks/build.d.ts +0 -46
- package/dist/types/hooks/dev.d.ts +0 -20
- package/dist/types/hooks/index.d.ts +0 -30
- package/dist/types/schema/build-config.d.ts +0 -205
- package/dist/types/schema/index.d.ts +0 -217
- package/dist/types/schema/output.d.ts +0 -215
- package/dist/types/schema/source.d.ts +0 -6
- package/dist/types/schema/tools.d.ts +0 -6
- package/dist/types/schema/types.d.ts +0 -45
- package/dist/types/types.d.ts +0 -51
- package/dist/types/utils/babel.d.ts +0 -8
- package/dist/types/utils/color.d.ts +0 -2
- package/dist/types/utils/constants.d.ts +0 -2
- package/dist/types/utils/copy.d.ts +0 -5
- package/dist/types/utils/init-env.d.ts +0 -21
- package/dist/types/utils/json.d.ts +0 -4
- package/dist/types/utils/language.d.ts +0 -1
- package/dist/types/utils/logger.d.ts +0 -58
- package/dist/types/utils/readline.d.ts +0 -9
- package/dist/types/utils/tspaths-transform/constants.d.ts +0 -1
- package/dist/types/utils/tspaths-transform/utils.d.ts +0 -4
- package/dist/types/utils/valide.d.ts +0 -12
- package/types.d.ts +0 -1
package/dist/error.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var error_exports = {};
|
|
19
|
+
__export(error_exports, {
|
|
20
|
+
InternalBuildError: () => InternalBuildError,
|
|
21
|
+
InternalDTSError: () => InternalDTSError,
|
|
22
|
+
ModuleBuildError: () => ModuleBuildError,
|
|
23
|
+
isExecaError: () => isExecaError,
|
|
24
|
+
isInternalError: () => isInternalError,
|
|
25
|
+
padSpaceWith: () => padSpaceWith
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(error_exports);
|
|
28
|
+
var import_utils = require("@modern-js/utils");
|
|
29
|
+
const padSpaceWith = (str, targetL, opts = {}) => {
|
|
30
|
+
const { endStr = "|", style } = opts;
|
|
31
|
+
const l = str.length;
|
|
32
|
+
const endStrL = endStr.length;
|
|
33
|
+
const resetL = targetL - l - endStrL;
|
|
34
|
+
if (resetL === 0) {
|
|
35
|
+
return (style ? style(str) : str) + endStr;
|
|
36
|
+
}
|
|
37
|
+
if (resetL > 0) {
|
|
38
|
+
const padStr = str.padEnd(targetL - 1, " ");
|
|
39
|
+
if (style) {
|
|
40
|
+
return style(str) + padStr.replace(str, "") + endStr;
|
|
41
|
+
}
|
|
42
|
+
return padStr + endStr;
|
|
43
|
+
}
|
|
44
|
+
return str;
|
|
45
|
+
};
|
|
46
|
+
class InternalBuildError extends Error {
|
|
47
|
+
constructor(e, opts) {
|
|
48
|
+
super(e.message);
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
this.e = e;
|
|
51
|
+
this.buildType = opts.buildType;
|
|
52
|
+
this.target = opts.target;
|
|
53
|
+
this.format = opts.format;
|
|
54
|
+
}
|
|
55
|
+
toString() {
|
|
56
|
+
return this.formatError().join("\n");
|
|
57
|
+
}
|
|
58
|
+
formatError() {
|
|
59
|
+
const msgs = [];
|
|
60
|
+
const { e, buildType, target, format } = this;
|
|
61
|
+
const textL = 25;
|
|
62
|
+
const title = `│ ${padSpaceWith(`${buildType} failed:`, textL - 2, {
|
|
63
|
+
style: import_utils.chalk.red.underline,
|
|
64
|
+
endStr: "│"
|
|
65
|
+
})}`;
|
|
66
|
+
const formatMsg = padSpaceWith(`│ - format is "${format}"`, textL, {
|
|
67
|
+
endStr: "│"
|
|
68
|
+
});
|
|
69
|
+
const targetMsg = padSpaceWith(`│ - target is "${target}"`, textL, {
|
|
70
|
+
endStr: "│"
|
|
71
|
+
});
|
|
72
|
+
const startLine = padSpaceWith("╭".padEnd(textL - 1, "─"), textL, {
|
|
73
|
+
endStr: "╮"
|
|
74
|
+
});
|
|
75
|
+
const endLine = padSpaceWith("╰".padEnd(textL - 1, "─"), textL, {
|
|
76
|
+
endStr: "╯"
|
|
77
|
+
});
|
|
78
|
+
msgs.push(
|
|
79
|
+
startLine,
|
|
80
|
+
title,
|
|
81
|
+
formatMsg,
|
|
82
|
+
targetMsg,
|
|
83
|
+
endLine,
|
|
84
|
+
import_utils.chalk.blue.bold.underline(`
|
|
85
|
+
Detailed Information: `)
|
|
86
|
+
);
|
|
87
|
+
msgs.push(e.toString());
|
|
88
|
+
msgs.push(e.stack || "");
|
|
89
|
+
return msgs;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
class InternalDTSError extends Error {
|
|
93
|
+
constructor(e, opts) {
|
|
94
|
+
super(e.message);
|
|
95
|
+
Error.captureStackTrace(this, this.constructor);
|
|
96
|
+
this.e = e;
|
|
97
|
+
this.buildType = opts.buildType;
|
|
98
|
+
}
|
|
99
|
+
toString() {
|
|
100
|
+
return this.formatError().join("\n");
|
|
101
|
+
}
|
|
102
|
+
formatError() {
|
|
103
|
+
var _a;
|
|
104
|
+
const msgs = [];
|
|
105
|
+
const { e, buildType } = this;
|
|
106
|
+
msgs.push(import_utils.chalk.red.bold(`${buildType} DTS failed:`));
|
|
107
|
+
if (isExecaError(e)) {
|
|
108
|
+
if (e.stack) {
|
|
109
|
+
msgs.push((_a = e.stack) == null ? void 0 : _a.replace(`${e.name}: ${e.shortMessage}`, ""));
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
msgs.push(e.stack);
|
|
113
|
+
}
|
|
114
|
+
return msgs;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
class ModuleBuildError extends Error {
|
|
118
|
+
constructor(e) {
|
|
119
|
+
super(`
|
|
120
|
+
|
|
121
|
+
${e}`);
|
|
122
|
+
Error.captureStackTrace(this, this.constructor);
|
|
123
|
+
this.name = "ModuleBuildError";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const isInternalError = (e) => {
|
|
127
|
+
if (e instanceof InternalBuildError || e instanceof InternalDTSError) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
return false;
|
|
131
|
+
};
|
|
132
|
+
const isExecaError = (e) => {
|
|
133
|
+
if (e.stdout) {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
};
|
|
138
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
139
|
+
0 && (module.exports = {
|
|
140
|
+
InternalBuildError,
|
|
141
|
+
InternalDTSError,
|
|
142
|
+
ModuleBuildError,
|
|
143
|
+
isExecaError,
|
|
144
|
+
isInternalError,
|
|
145
|
+
padSpaceWith
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAIf,MAAM,eAAe,CAC1B,KACA,SACA,OAGI,CAAC,MACF;AACH,QAAM,EAAE,SAAS,KAAK,MAAM,IAAI;AAChC,QAAM,IAAI,IAAI;AACd,QAAM,UAAU,OAAO;AACvB,QAAM,SAAS,UAAU,IAAI;AAG7B,MAAI,WAAW,GAAG;AAChB,YAAQ,QAAQ,MAAM,GAAG,IAAI,OAAO;AAAA,EACtC;AAGA,MAAI,SAAS,GAAG;AACd,UAAM,SAAS,IAAI,OAAO,UAAU,GAAG,GAAG;AAC1C,QAAI,OAAO;AACT,aAAO,MAAM,GAAG,IAAI,OAAO,QAAQ,KAAK,EAAE,IAAI;AAAA,IAChD;AACA,WAAO,SAAS;AAAA,EAClB;AAEA,SAAO;AACT;AAEO,MAAM,2BAA2B,MAAM;AAAA,EAS5C,YACE,GACA,MAKA;AACA,UAAM,EAAE,OAAO;AAEf,UAAM,kBAAkB,MAAM,KAAK,WAAW;AAE9C,SAAK,IAAI;AACT,SAAK,YAAY,KAAK;AACtB,SAAK,SAAS,KAAK;AACnB,SAAK,SAAS,KAAK;AAAA,EACrB;AAAA,EAEA,WAAW;AACT,WAAO,KAAK,YAAY,EAAE,KAAK,IAAI;AAAA,EACrC;AAAA,EAEA,cAAc;AACZ,UAAM,OAAiB,CAAC;AACxB,UAAM,EAAE,GAAG,WAAW,QAAQ,OAAO,IAAI;AACzC,UAAM,QAAQ;AACd,UAAM,QAAQ,KAAK,aAAa,GAAG,qBAAqB,QAAQ,GAAG;AAAA,MACjE,OAAO,mBAAM,IAAI;AAAA,MACjB,QAAQ;AAAA,IACV,CAAC;AACD,UAAM,YAAY,aAAa,mBAAmB,WAAW,OAAO;AAAA,MAClE,QAAQ;AAAA,IACV,CAAC;AACD,UAAM,YAAY,aAAa,mBAAmB,WAAW,OAAO;AAAA,MAClE,QAAQ;AAAA,IACV,CAAC;AACD,UAAM,YAAY,aAAa,IAAI,OAAO,QAAQ,GAAG,GAAG,GAAG,OAAO;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC;AACD,UAAM,UAAU,aAAa,IAAI,OAAO,QAAQ,GAAG,GAAG,GAAG,OAAO;AAAA,MAC9D,QAAQ;AAAA,IACV,CAAC;AACD,SAAK;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,mBAAM,KAAK,KAAK,UAAU;AAAA,uBAA0B;AAAA,IACtD;AACA,SAAK,KAAK,EAAE,SAAS,CAAC;AACtB,SAAK,KAAK,EAAE,SAAS,EAAE;AAEvB,WAAO;AAAA,EACT;AACF;AAEO,MAAM,yBAAyB,MAAM;AAAA,EAK1C,YAAY,GAAuB,MAAgC;AACjE,UAAM,EAAE,OAAO;AAEf,UAAM,kBAAkB,MAAM,KAAK,WAAW;AAE9C,SAAK,IAAI;AACT,SAAK,YAAY,KAAK;AAAA,EACxB;AAAA,EAEA,WAAW;AACT,WAAO,KAAK,YAAY,EAAE,KAAK,IAAI;AAAA,EACrC;AAAA,EAEA,cAAc;AAtHhB;AAuHI,UAAM,OAAiB,CAAC;AACxB,UAAM,EAAE,GAAG,UAAU,IAAI;AACzB,SAAK,KAAK,mBAAM,IAAI,KAAK,GAAG,uBAAuB,CAAC;AACpD,QAAI,aAAa,CAAC,GAAG;AAMnB,UAAI,EAAE,OAAO;AACX,aAAK,MAAK,OAAE,UAAF,mBAAS,QAAQ,GAAG,EAAE,SAAS,EAAE,gBAAgB,GAAG;AAAA,MAChE;AAAA,IACF,OAAO;AACL,WAAK,KAAK,EAAE,KAAM;AAAA,IACpB;AAEA,WAAO;AAAA,EACT;AACF;AAEO,MAAM,yBAAyB,MAAM;AAAA,EAC1C,YAAY,GAA0C;AACpD,UAAM;AAAA;AAAA,EAAO,GAAG;AAChB,UAAM,kBAAkB,MAAM,KAAK,WAAW;AAC9C,SAAK,OAAO;AAAA,EACd;AACF;AAEO,MAAM,kBAAkB,CAC7B,MAC+C;AAC/C,MAAI,aAAa,sBAAsB,aAAa,kBAAkB;AACpE,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEO,MAAM,eAAe,CAAC,MAA4B;AACvD,MAAI,EAAE,QAAQ;AACZ,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;;;;;;;;","names":[],"sources":["../src/error.ts"],"sourcesContent":["import { chalk } from '@modern-js/utils';\nimport type { ExecaError } from '@modern-js/utils';\nimport type { BuildType, Format, Target } from './types';\n\nexport const padSpaceWith = (\n str: string,\n targetL: number,\n opts: {\n endStr?: string;\n style?: (s: string) => string;\n } = {},\n) => {\n const { endStr = '|', style } = opts;\n const l = str.length;\n const endStrL = endStr.length;\n const resetL = targetL - l - endStrL;\n\n // str is 'aaa', targetL is 4, result is 'aaa|'\n if (resetL === 0) {\n return (style ? style(str) : str) + endStr;\n }\n\n // str is 'aaa', targetL is 5, result is 'aaa |'\n if (resetL > 0) {\n const padStr = str.padEnd(targetL - 1, ' ');\n if (style) {\n return style(str) + padStr.replace(str, '') + endStr;\n }\n return padStr + endStr;\n }\n\n return str;\n};\n\nexport class InternalBuildError extends Error {\n public buildType: BuildType;\n\n public target: Target;\n\n public format: Format;\n\n private e: Error;\n\n constructor(\n e: Error,\n opts: {\n buildType: BuildType;\n format: Format;\n target: Target;\n },\n ) {\n super(e.message);\n\n Error.captureStackTrace(this, this.constructor);\n\n this.e = e;\n this.buildType = opts.buildType;\n this.target = opts.target;\n this.format = opts.format;\n }\n\n toString() {\n return this.formatError().join('\\n');\n }\n\n formatError() {\n const msgs: string[] = [];\n const { e, buildType, target, format } = this;\n const textL = 25;\n const title = `│ ${padSpaceWith(`${buildType} failed:`, textL - 2, {\n style: chalk.red.underline,\n endStr: '│',\n })}`;\n const formatMsg = padSpaceWith(`│ - format is \"${format}\"`, textL, {\n endStr: '│',\n });\n const targetMsg = padSpaceWith(`│ - target is \"${target}\"`, textL, {\n endStr: '│',\n });\n const startLine = padSpaceWith('╭'.padEnd(textL - 1, '─'), textL, {\n endStr: '╮',\n });\n const endLine = padSpaceWith('╰'.padEnd(textL - 1, '─'), textL, {\n endStr: '╯',\n });\n msgs.push(\n startLine,\n title,\n formatMsg,\n targetMsg,\n endLine,\n chalk.blue.bold.underline(`\\nDetailed Information: `),\n );\n msgs.push(e.toString());\n msgs.push(e.stack || '');\n\n return msgs;\n }\n}\n\nexport class InternalDTSError extends Error {\n public buildType: BuildType;\n\n private e: Error;\n\n constructor(e: Error | ExecaError, opts: { buildType: BuildType }) {\n super(e.message);\n\n Error.captureStackTrace(this, this.constructor);\n\n this.e = e;\n this.buildType = opts.buildType;\n }\n\n toString() {\n return this.formatError().join('\\n');\n }\n\n formatError() {\n const msgs: string[] = [];\n const { e, buildType } = this;\n msgs.push(chalk.red.bold(`${buildType} DTS failed:`));\n if (isExecaError(e)) {\n /**\n * `shortMeessage` content like:\n * 'Command failed with exit code 2: /Users/github/modern.js/playground/module/node_modules/.bin/tsc -p /Users/github/modern.js/playground/module/node_modules/tsconfig.temp.json --pretty'\n * Don`t need it.\n */\n if (e.stack) {\n msgs.push(e.stack?.replace(`${e.name}: ${e.shortMessage}`, ''));\n }\n } else {\n msgs.push(e.stack!);\n }\n\n return msgs;\n }\n}\n\nexport class ModuleBuildError extends Error {\n constructor(e: InternalBuildError | InternalDTSError) {\n super(`\\n\\n${e}`);\n Error.captureStackTrace(this, this.constructor);\n this.name = 'ModuleBuildError';\n }\n}\n\nexport const isInternalError = (\n e: unknown,\n): e is InternalDTSError | InternalBuildError => {\n if (e instanceof InternalBuildError || e instanceof InternalDTSError) {\n return true;\n }\n\n return false;\n};\n\nexport const isExecaError = (e: any): e is ExecaError => {\n if (e.stdout) {\n return true;\n }\n\n return false;\n};\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RegisterBuildPlatformResult } from '@modern-js/core';
|
|
2
|
+
import { BuildCommandOptions } from '../types';
|
|
3
|
+
import type { BuildConfig, BaseBuildConfig } from '../types/config';
|
|
4
|
+
import type { BuildTaskResult, BuildResult, BuildPlatformResult } from '../types/hooks';
|
|
5
|
+
export declare const buildHooks: {
|
|
6
|
+
beforeBuild: import("@modern-js/plugin").ParallelWorkflow<{
|
|
7
|
+
config: BuildConfig;
|
|
8
|
+
options: BuildCommandOptions;
|
|
9
|
+
}, BuildConfig>;
|
|
10
|
+
beforeBuildTask: import("@modern-js/plugin").AsyncPipeline<{
|
|
11
|
+
config: BaseBuildConfig;
|
|
12
|
+
options: BuildCommandOptions;
|
|
13
|
+
}, BaseBuildConfig>;
|
|
14
|
+
afterBuildTask: import("@modern-js/plugin").ParallelWorkflow<BuildTaskResult, void>;
|
|
15
|
+
afterBuild: import("@modern-js/plugin").ParallelWorkflow<BuildResult, void>;
|
|
16
|
+
registerBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<void, RegisterBuildPlatformResult>;
|
|
17
|
+
beforeBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<RegisterBuildPlatformResult[], void>;
|
|
18
|
+
buildPlatform: import("@modern-js/plugin").ParallelWorkflow<{
|
|
19
|
+
platform: string;
|
|
20
|
+
}, Pick<RegisterBuildPlatformResult, "build">>;
|
|
21
|
+
afterBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<void, BuildPlatformResult>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var build_exports = {};
|
|
19
|
+
__export(build_exports, {
|
|
20
|
+
buildHooks: () => buildHooks
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(build_exports);
|
|
23
|
+
var import_plugin = require("@modern-js/plugin");
|
|
24
|
+
const buildHooks = {
|
|
25
|
+
beforeBuild: (0, import_plugin.createParallelWorkflow)(),
|
|
26
|
+
beforeBuildTask: (0, import_plugin.createAsyncPipeline)(),
|
|
27
|
+
afterBuildTask: (0, import_plugin.createParallelWorkflow)(),
|
|
28
|
+
afterBuild: (0, import_plugin.createParallelWorkflow)(),
|
|
29
|
+
registerBuildPlatform: (0, import_plugin.createParallelWorkflow)(),
|
|
30
|
+
beforeBuildPlatform: (0, import_plugin.createParallelWorkflow)(),
|
|
31
|
+
buildPlatform: (0, import_plugin.createParallelWorkflow)(),
|
|
32
|
+
afterBuildPlatform: (0, import_plugin.createParallelWorkflow)()
|
|
33
|
+
};
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
buildHooks
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA4D;AAUrD,MAAM,aAAa;AAAA,EACxB,iBAAa,sCAGX;AAAA,EACF,qBAAiB,mCAGf;AAAA,EACF,oBAAgB,sCAA8C;AAAA,EAC9D,gBAAY,sCAA0C;AAAA,EACtD,2BAAuB,sCAGrB;AAAA,EACF,yBAAqB,sCAGnB;AAAA,EACF,mBAAe,sCAGb;AAAA,EACF,wBAAoB,sCAAkD;AACxE;;;;;","names":[],"sources":["../../src/hooks/build.ts"],"sourcesContent":["import { createParallelWorkflow, createAsyncPipeline } from '@modern-js/plugin';\nimport type { RegisterBuildPlatformResult } from '@modern-js/core';\nimport { BuildCommandOptions } from '../types';\nimport type { BuildConfig, BaseBuildConfig } from '../types/config';\nimport type {\n BuildTaskResult,\n BuildResult,\n BuildPlatformResult,\n} from '../types/hooks';\n\nexport const buildHooks = {\n beforeBuild: createParallelWorkflow<\n { config: BuildConfig; options: BuildCommandOptions },\n BuildConfig\n >(),\n beforeBuildTask: createAsyncPipeline<\n { config: BaseBuildConfig; options: BuildCommandOptions },\n BaseBuildConfig\n >(),\n afterBuildTask: createParallelWorkflow<BuildTaskResult, void>(),\n afterBuild: createParallelWorkflow<BuildResult, void>(),\n registerBuildPlatform: createParallelWorkflow<\n void,\n RegisterBuildPlatformResult\n >(),\n beforeBuildPlatform: createParallelWorkflow<\n RegisterBuildPlatformResult[],\n void\n >(),\n buildPlatform: createParallelWorkflow<\n { platform: string },\n Pick<RegisterBuildPlatformResult, 'build'>\n >(),\n afterBuildPlatform: createParallelWorkflow<void, BuildPlatformResult>(),\n};\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DevToolData, PromptResult } from '../types/hooks';
|
|
2
|
+
export declare const devHooks: {
|
|
3
|
+
registerDev: import("@modern-js/plugin").ParallelWorkflow<void, DevToolData>;
|
|
4
|
+
beforeDev: import("@modern-js/plugin").ParallelWorkflow<DevToolData[], void>;
|
|
5
|
+
beforeDevMenu: import("@modern-js/plugin").ParallelWorkflow<any, any>;
|
|
6
|
+
afterDevMenu: import("@modern-js/plugin").ParallelWorkflow<{
|
|
7
|
+
result: PromptResult;
|
|
8
|
+
devTools: DevToolData[];
|
|
9
|
+
}, void>;
|
|
10
|
+
beforeDevTask: import("@modern-js/plugin").ParallelWorkflow<DevToolData, void>;
|
|
11
|
+
afterDev: import("@modern-js/plugin").ParallelWorkflow<void, void>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var dev_exports = {};
|
|
19
|
+
__export(dev_exports, {
|
|
20
|
+
devHooks: () => devHooks
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(dev_exports);
|
|
23
|
+
var import_plugin = require("@modern-js/plugin");
|
|
24
|
+
const devHooks = {
|
|
25
|
+
registerDev: (0, import_plugin.createParallelWorkflow)(),
|
|
26
|
+
beforeDev: (0, import_plugin.createParallelWorkflow)(),
|
|
27
|
+
beforeDevMenu: (0, import_plugin.createParallelWorkflow)(),
|
|
28
|
+
afterDevMenu: (0, import_plugin.createParallelWorkflow)(),
|
|
29
|
+
beforeDevTask: (0, import_plugin.createParallelWorkflow)(),
|
|
30
|
+
afterDev: (0, import_plugin.createParallelWorkflow)()
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
devHooks
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=dev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuC;AAIhC,MAAM,WAAW;AAAA,EACtB,iBAAa,sCAA0C;AAAA,EACvD,eAAW,sCAA4C;AAAA,EACvD,mBAAe,sCAGb;AAAA,EACF,kBAAc,sCAGZ;AAAA,EACF,mBAAe,sCAA0C;AAAA,EACzD,cAAU,sCAAmC;AAC/C;;;;;","names":[],"sources":["../../src/hooks/dev.ts"],"sourcesContent":["import { createParallelWorkflow } from '@modern-js/plugin';\nimport type { QuestionCollection } from '@modern-js/utils/compiled/inquirer';\nimport type { DevToolData, PromptResult } from '../types/hooks';\n\nexport const devHooks = {\n registerDev: createParallelWorkflow<void, DevToolData>(),\n beforeDev: createParallelWorkflow<DevToolData[], void>(),\n beforeDevMenu: createParallelWorkflow<\n QuestionCollection,\n QuestionCollection | void\n >(),\n afterDevMenu: createParallelWorkflow<\n { result: PromptResult; devTools: DevToolData[] },\n void\n >(),\n beforeDevTask: createParallelWorkflow<DevToolData, void>(),\n afterDev: createParallelWorkflow<void, void>(),\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const registerHook: {
|
|
2
|
+
addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
|
|
3
|
+
modifyLibuild: import("@modern-js/plugin").AsyncPipeline<import("@modern-js/libuild").CLIConfig, import("@modern-js/libuild").CLIConfig>;
|
|
4
|
+
registerDev: import("@modern-js/plugin").ParallelWorkflow<void, import("..").DevToolData>;
|
|
5
|
+
beforeDev: import("@modern-js/plugin").ParallelWorkflow<import("..").DevToolData[], void>;
|
|
6
|
+
beforeDevMenu: import("@modern-js/plugin").ParallelWorkflow<any, any>;
|
|
7
|
+
afterDevMenu: import("@modern-js/plugin").ParallelWorkflow<{
|
|
8
|
+
result: import("..").PromptResult;
|
|
9
|
+
devTools: import("..").DevToolData[];
|
|
10
|
+
}, void>;
|
|
11
|
+
beforeDevTask: import("@modern-js/plugin").ParallelWorkflow<import("..").DevToolData, void>;
|
|
12
|
+
afterDev: import("@modern-js/plugin").ParallelWorkflow<void, void>;
|
|
13
|
+
beforeBuild: import("@modern-js/plugin").ParallelWorkflow<{
|
|
14
|
+
config: import("..").BuildConfig;
|
|
15
|
+
options: import("..").BuildCommandOptions;
|
|
16
|
+
}, import("..").BuildConfig>;
|
|
17
|
+
beforeBuildTask: import("@modern-js/plugin").AsyncPipeline<{
|
|
18
|
+
config: import("..").BaseBuildConfig;
|
|
19
|
+
options: import("..").BuildCommandOptions;
|
|
20
|
+
}, import("..").BaseBuildConfig>;
|
|
21
|
+
afterBuildTask: import("@modern-js/plugin").ParallelWorkflow<import("..").BuildTaskResult, void>;
|
|
22
|
+
afterBuild: import("@modern-js/plugin").ParallelWorkflow<import("..").BuildResult, void>;
|
|
23
|
+
registerBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<void, import("@modern-js/core").RegisterBuildPlatformResult>;
|
|
24
|
+
beforeBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<import("@modern-js/core").RegisterBuildPlatformResult[], void>;
|
|
25
|
+
buildPlatform: import("@modern-js/plugin").ParallelWorkflow<{
|
|
26
|
+
platform: string;
|
|
27
|
+
}, Pick<import("@modern-js/core").RegisterBuildPlatformResult, "build">>;
|
|
28
|
+
afterBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<void, import("..").BuildPlatformResult>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
|
+
};
|
|
23
|
+
var __copyProps = (to, from, except, desc) => {
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
25
|
+
for (let key of __getOwnPropNames(from))
|
|
26
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
27
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
28
|
+
}
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
+
var hooks_exports = {};
|
|
33
|
+
__export(hooks_exports, {
|
|
34
|
+
registerHook: () => registerHook
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(hooks_exports);
|
|
37
|
+
var import_build = require("./build");
|
|
38
|
+
var import_dev = require("./dev");
|
|
39
|
+
var import_misc = require("./misc");
|
|
40
|
+
const registerHook = __spreadValues(__spreadValues(__spreadValues({}, import_build.buildHooks), import_dev.devHooks), import_misc.miscHooks);
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
registerHook
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAC3B,iBAAyB;AACzB,kBAA0B;AAEnB,MAAM,eAAe,iDACvB,0BACA,sBACA;;;;;","names":[],"sources":["../../src/hooks/index.ts"],"sourcesContent":["import { buildHooks } from './build';\nimport { devHooks } from './dev';\nimport { miscHooks } from './misc';\n\nexport const registerHook = {\n ...buildHooks,\n ...devHooks,\n ...miscHooks,\n};\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var misc_exports = {};
|
|
19
|
+
__export(misc_exports, {
|
|
20
|
+
miscHooks: () => miscHooks
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(misc_exports);
|
|
23
|
+
var import_plugin = require("@modern-js/plugin");
|
|
24
|
+
const miscHooks = {
|
|
25
|
+
addRuntimeExports: (0, import_plugin.createAsyncWaterfall)(),
|
|
26
|
+
modifyLibuild: (0, import_plugin.createAsyncPipeline)()
|
|
27
|
+
};
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
miscHooks
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=misc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0D;AAGnD,MAAM,YAAY;AAAA,EACvB,uBAAmB,oCAAqB;AAAA,EACxC,mBAAe,mCAA0C;AAC3D;;;;;","names":[],"sources":["../../src/hooks/misc.ts"],"sourcesContent":["import { createAsyncPipeline, createAsyncWaterfall } from '@modern-js/plugin';\nimport type { CLIConfig } from '@modern-js/libuild';\n\nexport const miscHooks = {\n addRuntimeExports: createAsyncWaterfall(),\n modifyLibuild: createAsyncPipeline<CLIConfig, CLIConfig>(),\n};\n"]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var src_exports = {};
|
|
20
|
+
__export(src_exports, {
|
|
21
|
+
default: () => src_default,
|
|
22
|
+
defineConfig: () => import_defineConfig.defineConfig,
|
|
23
|
+
legacyPresets: () => import_legacy_build_presets.legacyPresets
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
|
+
var import_cli = require("./cli");
|
|
27
|
+
var import_defineConfig = require("./config/defineConfig");
|
|
28
|
+
var import_legacy_build_presets = require("./constants/legacy-build-presets");
|
|
29
|
+
__reExport(src_exports, require("./types"), module.exports);
|
|
30
|
+
var src_default = import_cli.cli;
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
defineConfig,
|
|
34
|
+
legacyPresets
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoB;AAEpB,0BAA6B;AAC7B,kCAA8B;AAC9B,wBAAc,oBAJd;AAKA,IAAO,cAAQ;;;;;;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { cli } from './cli';\n\nexport { defineConfig } from './config/defineConfig';\nexport { legacyPresets } from './constants/legacy-build-presets';\nexport * from './types';\nexport default cli;\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var en_exports = {};
|
|
19
|
+
__export(en_exports, {
|
|
20
|
+
EN_LOCALE: () => EN_LOCALE
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(en_exports);
|
|
23
|
+
const EN_LOCALE = {
|
|
24
|
+
command: {
|
|
25
|
+
build: {
|
|
26
|
+
describe: "command for building module",
|
|
27
|
+
watch: "building module in watch mode",
|
|
28
|
+
tsconfig: "Specify a path to the tsconfig.json file",
|
|
29
|
+
style_only: "only build style",
|
|
30
|
+
platform: 'build the specified task or all tasks, If exist. (tasks: "storybook", "docs")',
|
|
31
|
+
no_tsc: "close tsc compiler to emit d.ts (Deprecated)",
|
|
32
|
+
dts: "Turn on dts generation and type checking",
|
|
33
|
+
no_clear: "disable auto clear dist dir",
|
|
34
|
+
config: "specify config file"
|
|
35
|
+
},
|
|
36
|
+
dev: { describe: "start dev server" },
|
|
37
|
+
new: {
|
|
38
|
+
describe: "generator runner for modern project",
|
|
39
|
+
debug: "using debug mode to log something",
|
|
40
|
+
config: "set default generator config(json string)",
|
|
41
|
+
distTag: `use specified tag version for it's generator`,
|
|
42
|
+
registry: "set npm registry url to run npm command"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
EN_LOCALE
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,YAAY;AAAA,EACvB,SAAS;AAAA,IACP,OAAO;AAAA,MACL,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,UACE;AAAA,MACF,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,UAAU;AAAA,MACV,QAAQ;AAAA,IACV;AAAA,IACA,KAAK,EAAE,UAAU,mBAAmB;AAAA,IACpC,KAAK;AAAA,MACH,UAAU;AAAA,MACV,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,EACF;AACF;","names":[],"sources":["../../src/locale/en.ts"],"sourcesContent":["export const EN_LOCALE = {\n command: {\n build: {\n describe: 'command for building module',\n watch: 'building module in watch mode',\n tsconfig: 'Specify a path to the tsconfig.json file',\n style_only: 'only build style',\n platform:\n 'build the specified task or all tasks, If exist. (tasks: \"storybook\", \"docs\")',\n no_tsc: 'close tsc compiler to emit d.ts (Deprecated)',\n dts: 'Turn on dts generation and type checking',\n no_clear: 'disable auto clear dist dir',\n config: 'specify config file',\n },\n dev: { describe: 'start dev server' },\n new: {\n describe: 'generator runner for modern project',\n debug: 'using debug mode to log something',\n config: 'set default generator config(json string)',\n distTag: `use specified tag version for it's generator`,\n registry: 'set npm registry url to run npm command',\n },\n },\n};\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var locale_exports = {};
|
|
19
|
+
__export(locale_exports, {
|
|
20
|
+
i18n: () => i18n,
|
|
21
|
+
localeKeys: () => localeKeys
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(locale_exports);
|
|
24
|
+
var import_utils = require("@modern-js/utils");
|
|
25
|
+
var import_zh = require("./zh");
|
|
26
|
+
var import_en = require("./en");
|
|
27
|
+
const i18nPlugin = import_utils.Import.lazy(
|
|
28
|
+
"@modern-js/plugin-i18n",
|
|
29
|
+
require
|
|
30
|
+
);
|
|
31
|
+
const i18n = new i18nPlugin.I18n();
|
|
32
|
+
const localeKeys = i18n.init("zh", { zh: import_zh.ZH_LOCALE, en: import_en.EN_LOCALE });
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
i18n,
|
|
36
|
+
localeKeys
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuB;AAEvB,gBAA0B;AAC1B,gBAA0B;AAE1B,MAAM,aAAsD,oBAAO;AAAA,EACjE;AAAA,EACA;AACF;AAEA,MAAM,OAAO,IAAI,WAAW,KAAK;AAEjC,MAAM,aAAa,KAAK,KAAK,MAAM,EAAE,IAAI,qBAAW,IAAI,oBAAU,CAAC;;;;;;","names":[],"sources":["../../src/locale/index.ts"],"sourcesContent":["import { Import } from '@modern-js/utils';\n\nimport { ZH_LOCALE } from './zh';\nimport { EN_LOCALE } from './en';\n\nconst i18nPlugin: typeof import('@modern-js/plugin-i18n') = Import.lazy(\n '@modern-js/plugin-i18n',\n require,\n);\n\nconst i18n = new i18nPlugin.I18n();\n\nconst localeKeys = i18n.init('zh', { zh: ZH_LOCALE, en: EN_LOCALE });\n\nexport { i18n, localeKeys };\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var zh_exports = {};
|
|
19
|
+
__export(zh_exports, {
|
|
20
|
+
ZH_LOCALE: () => ZH_LOCALE
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(zh_exports);
|
|
23
|
+
const ZH_LOCALE = {
|
|
24
|
+
command: {
|
|
25
|
+
build: {
|
|
26
|
+
describe: "构建模块命令",
|
|
27
|
+
watch: "使用 Watch 模式构建模块",
|
|
28
|
+
tsconfig: "指定 tsconfig.json 文件的路径",
|
|
29
|
+
style_only: "只构建样式文件",
|
|
30
|
+
platform: '如果存在的话,执行指定的构建任务或者全部构建任务. (构建任务包括: "storybook", "文档")',
|
|
31
|
+
no_tsc: "关闭 tsc 编译(废弃)",
|
|
32
|
+
dts: "开启 dts 文件的生成以及类型检查",
|
|
33
|
+
no_clear: "不清理产物目录",
|
|
34
|
+
config: "指定配置文件路径,可以为相对路径或绝对路径"
|
|
35
|
+
},
|
|
36
|
+
dev: { describe: "本地开发命令" },
|
|
37
|
+
new: {
|
|
38
|
+
describe: "模块化工程方案中执行生成器",
|
|
39
|
+
debug: "开启 Debug 模式,打印调试日志信息",
|
|
40
|
+
config: "生成器运行默认配置(JSON 字符串)",
|
|
41
|
+
distTag: "生成器使用特殊的 npm Tag 版本",
|
|
42
|
+
registry: "生成器运行过程中定制 npm Registry"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
ZH_LOCALE
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=zh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,YAAY;AAAA,EACvB,SAAS;AAAA,IACP,OAAO;AAAA,MACL,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,UACE;AAAA,MACF,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,UAAU;AAAA,MACV,QAAQ;AAAA,IACV;AAAA,IACA,KAAK,EAAE,UAAU,SAAS;AAAA,IAC1B,KAAK;AAAA,MACH,UAAU;AAAA,MACV,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,EACF;AACF;","names":[],"sources":["../../src/locale/zh.ts"],"sourcesContent":["export const ZH_LOCALE = {\n command: {\n build: {\n describe: '构建模块命令',\n watch: '使用 Watch 模式构建模块',\n tsconfig: '指定 tsconfig.json 文件的路径',\n style_only: '只构建样式文件',\n platform:\n '如果存在的话,执行指定的构建任务或者全部构建任务. (构建任务包括: \"storybook\", \"文档\")',\n no_tsc: '关闭 tsc 编译(废弃)',\n dts: '开启 dts 文件的生成以及类型检查',\n no_clear: '不清理产物目录',\n config: '指定配置文件路径,可以为相对路径或绝对路径',\n },\n dev: { describe: '本地开发命令' },\n new: {\n describe: '模块化工程方案中执行生成器',\n debug: '开启 Debug 模式,打印调试日志信息',\n config: '生成器运行默认配置(JSON 字符串)',\n distTag: '生成器使用特殊的 npm Tag 版本',\n registry: '生成器运行过程中定制 npm Registry',\n },\n },\n};\n"]}
|