@modern-js/module-tools 2.0.0-beta.2 → 2.0.0-beta.4
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 +276 -205
- package/bin/modern.js +7 -1
- 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 +265 -0
- package/dist/builder/build.js.map +1 -0
- package/dist/builder/clear.d.ts +3 -0
- package/dist/builder/clear.js +74 -0
- package/dist/builder/clear.js.map +1 -0
- package/dist/builder/copy.d.ts +9 -0
- package/dist/builder/copy.js +207 -0
- package/dist/builder/copy.js.map +1 -0
- package/dist/builder/dts/index.d.ts +2 -0
- package/dist/builder/dts/index.js +27 -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 +180 -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 +160 -0
- package/dist/builder/dts/tsc.js.map +1 -0
- package/dist/builder/index.d.ts +8 -0
- package/dist/builder/index.js +124 -0
- package/dist/builder/index.js.map +1 -0
- package/dist/builder/platform.d.ts +4 -0
- package/dist/builder/platform.js +140 -0
- package/dist/builder/platform.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +103 -0
- package/dist/cli.js.map +1 -0
- package/dist/command.d.ts +7 -0
- package/dist/command.js +169 -0
- package/dist/command.js.map +1 -0
- package/dist/config/defineConfig.d.ts +2 -0
- package/dist/config/defineConfig.js +25 -0
- package/dist/config/defineConfig.js.map +1 -0
- package/dist/config/normalize.d.ts +17 -0
- package/dist/config/normalize.js +177 -0
- package/dist/config/normalize.js.map +1 -0
- package/dist/config/schema.d.ts +641 -0
- package/dist/config/schema.js +207 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/constants/build-presets.d.ts +81 -0
- package/dist/constants/build-presets.js +219 -0
- package/dist/constants/build-presets.js.map +1 -0
- package/dist/constants/build.d.ts +5 -0
- package/dist/constants/build.js +71 -0
- package/dist/constants/build.js.map +1 -0
- package/dist/constants/colors.d.ts +4 -0
- package/dist/constants/colors.js +29 -0
- package/dist/constants/colors.js.map +1 -0
- package/dist/constants/dts.d.ts +4 -0
- package/dist/constants/dts.js +45 -0
- package/dist/constants/dts.js.map +1 -0
- package/dist/constants/file.d.ts +3 -0
- package/dist/constants/file.js +29 -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 +189 -0
- package/dist/constants/legacy-build-presets.js.map +1 -0
- package/dist/constants/log.d.ts +8 -0
- package/dist/constants/log.js +36 -0
- package/dist/constants/log.js.map +1 -0
- package/dist/dev.d.ts +10 -0
- package/dist/dev.js +135 -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 +139 -0
- package/dist/error.js.map +1 -0
- package/dist/hooks/build.d.ts +22 -0
- package/dist/hooks/build.js +35 -0
- package/dist/hooks/build.js.map +1 -0
- package/dist/hooks/dev.d.ts +12 -0
- package/dist/hooks/dev.js +33 -0
- package/dist/hooks/dev.js.map +1 -0
- package/dist/hooks/index.d.ts +29 -0
- package/dist/hooks/index.js +44 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/misc.d.ts +5 -0
- package/dist/hooks/misc.js +29 -0
- package/dist/hooks/misc.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/{types/locale → locale}/en.d.ts +0 -0
- package/dist/locale/en.js +47 -0
- package/dist/locale/en.js.map +1 -0
- package/dist/{types/locale → locale}/index.d.ts +0 -0
- package/dist/locale/index.js +34 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/{types/locale → locale}/zh.d.ts +0 -0
- package/dist/locale/zh.js +47 -0
- package/dist/locale/zh.js.map +1 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +51 -0
- package/dist/plugins.js.map +1 -0
- package/dist/types/color.d.ts +1 -0
- package/dist/{js/modern/features/build/types.js → types/color.js} +0 -0
- package/dist/types/command.d.ts +11 -0
- package/dist/{js/modern/schema/types.js → types/command.js} +0 -0
- package/dist/types/config/index.d.ts +95 -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/{js/modern/types.js → types/config/style.js} +0 -0
- package/dist/types/context.d.ts +5 -0
- package/dist/{js/node/features/build/types.js → types/context.js} +0 -0
- package/dist/types/copy.d.ts +15 -0
- package/dist/{js/node/schema/types.js → types/copy.js} +0 -0
- package/dist/types/{utils/tsconfig.d.ts → dts.d.ts} +11 -3
- package/dist/{js/node/types.js → types/dts.js} +0 -0
- package/dist/types/hooks.d.ts +25 -0
- package/dist/types/hooks.js +0 -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 +0 -0
- package/dist/utils/builder.d.ts +8 -0
- package/dist/utils/builder.js +117 -0
- package/dist/utils/builder.js.map +1 -0
- package/dist/utils/config.d.ts +6 -0
- package/dist/utils/config.js +172 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/context.d.ts +7 -0
- package/dist/utils/context.js +68 -0
- package/dist/utils/context.js.map +1 -0
- package/dist/utils/dts.d.ts +14 -0
- package/dist/utils/dts.js +197 -0
- package/dist/utils/dts.js.map +1 -0
- package/dist/utils/input.d.ts +16 -0
- package/dist/utils/input.js +124 -0
- package/dist/utils/input.js.map +1 -0
- package/dist/utils/language.d.ts +2 -0
- package/dist/utils/language.js +75 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/libuild-plugins.d.ts +6 -0
- package/dist/utils/libuild-plugins.js +90 -0
- package/dist/utils/libuild-plugins.js.map +1 -0
- package/dist/utils/log.d.ts +2 -0
- package/dist/utils/log.js +76 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/onExit.d.ts +1 -0
- package/dist/utils/onExit.js +71 -0
- package/dist/utils/onExit.js.map +1 -0
- package/dist/utils/path.d.ts +1 -0
- package/dist/utils/path.js +73 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/style.d.ts +31 -0
- package/dist/utils/style.js +134 -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 +115 -0
- package/dist/utils/tspaths-transform.js.map +1 -0
- package/package.json +47 -73
- 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/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/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/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/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
|
@@ -0,0 +1,207 @@
|
|
|
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 stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
buildConfig: () => buildConfig,
|
|
21
|
+
buildPreset: () => buildPreset,
|
|
22
|
+
presets: () => presets,
|
|
23
|
+
schema: () => schema,
|
|
24
|
+
targets: () => targets
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
27
|
+
const targets = [
|
|
28
|
+
"es5",
|
|
29
|
+
"es6",
|
|
30
|
+
"es2015",
|
|
31
|
+
"es2016",
|
|
32
|
+
"es2017",
|
|
33
|
+
"es2018",
|
|
34
|
+
"es2019",
|
|
35
|
+
"es2020",
|
|
36
|
+
"es2021",
|
|
37
|
+
"es2022",
|
|
38
|
+
"esnext"
|
|
39
|
+
];
|
|
40
|
+
const presets = [
|
|
41
|
+
"npm-library",
|
|
42
|
+
"npm-library-with-umd",
|
|
43
|
+
"npm-component",
|
|
44
|
+
"npm-component-with-umd",
|
|
45
|
+
...[
|
|
46
|
+
"npm-library",
|
|
47
|
+
"npm-library-with-umd",
|
|
48
|
+
"npm-component",
|
|
49
|
+
"npm-component-with-umd"
|
|
50
|
+
].reduce((ret, crt) => {
|
|
51
|
+
return [...ret, ...targets.map((t) => `${crt}-${t}`)];
|
|
52
|
+
}, [])
|
|
53
|
+
];
|
|
54
|
+
const buildConfigProperties = {
|
|
55
|
+
alias: {
|
|
56
|
+
typeof: ["object", "function"]
|
|
57
|
+
},
|
|
58
|
+
asset: {
|
|
59
|
+
type: "object"
|
|
60
|
+
},
|
|
61
|
+
autoExternal: {
|
|
62
|
+
if: {
|
|
63
|
+
type: "object"
|
|
64
|
+
},
|
|
65
|
+
then: {
|
|
66
|
+
properties: {
|
|
67
|
+
dependencies: { type: "boolean" },
|
|
68
|
+
peerDependencies: { type: "boolean" }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
else: { type: "boolean" }
|
|
72
|
+
},
|
|
73
|
+
buildType: {
|
|
74
|
+
enum: ["bundle", "bundleless"]
|
|
75
|
+
},
|
|
76
|
+
copy: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
patterns: {
|
|
80
|
+
type: "array",
|
|
81
|
+
items: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
from: { type: "string" },
|
|
85
|
+
to: { type: "string" },
|
|
86
|
+
context: { type: "string" },
|
|
87
|
+
globOptions: { type: "object" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
options: {
|
|
92
|
+
type: "object",
|
|
93
|
+
properties: {
|
|
94
|
+
concurrency: {
|
|
95
|
+
type: "number"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
define: {
|
|
102
|
+
typeof: "object"
|
|
103
|
+
},
|
|
104
|
+
dts: {
|
|
105
|
+
if: { type: "object" },
|
|
106
|
+
then: {
|
|
107
|
+
properties: {
|
|
108
|
+
distPath: { type: "string" },
|
|
109
|
+
tsconfigPath: { type: "string" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
else: { type: "boolean" }
|
|
113
|
+
},
|
|
114
|
+
externals: {
|
|
115
|
+
type: "array",
|
|
116
|
+
items: {
|
|
117
|
+
anyOf: [
|
|
118
|
+
{
|
|
119
|
+
instanceof: "RegExp"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
typeof: "string"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
format: {
|
|
128
|
+
enum: ["cjs", "esm", "iife", "umd"]
|
|
129
|
+
},
|
|
130
|
+
input: {
|
|
131
|
+
type: ["array", "object"]
|
|
132
|
+
},
|
|
133
|
+
jsx: {
|
|
134
|
+
enum: ["automatic", "transform"]
|
|
135
|
+
},
|
|
136
|
+
minify: {
|
|
137
|
+
if: {
|
|
138
|
+
type: "object"
|
|
139
|
+
},
|
|
140
|
+
else: { enum: ["esbuild", "terser", false] }
|
|
141
|
+
},
|
|
142
|
+
outdir: { type: "string" },
|
|
143
|
+
platform: {
|
|
144
|
+
enum: ["node", "browser"]
|
|
145
|
+
},
|
|
146
|
+
sourceDir: {
|
|
147
|
+
typeof: "string"
|
|
148
|
+
},
|
|
149
|
+
sourceMap: {
|
|
150
|
+
enum: [true, false, "inline", "external"]
|
|
151
|
+
},
|
|
152
|
+
splitting: {
|
|
153
|
+
type: "boolean"
|
|
154
|
+
},
|
|
155
|
+
style: {
|
|
156
|
+
type: "object"
|
|
157
|
+
},
|
|
158
|
+
target: {
|
|
159
|
+
enum: targets
|
|
160
|
+
},
|
|
161
|
+
umdGlobals: {
|
|
162
|
+
type: "object"
|
|
163
|
+
},
|
|
164
|
+
umdModuleName: {
|
|
165
|
+
anyOf: [
|
|
166
|
+
{
|
|
167
|
+
instanceof: "Function"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
typeof: "string"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const buildConfig = {
|
|
176
|
+
target: "buildConfig",
|
|
177
|
+
schema: {
|
|
178
|
+
if: {
|
|
179
|
+
type: "array"
|
|
180
|
+
},
|
|
181
|
+
then: {
|
|
182
|
+
items: [
|
|
183
|
+
{
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: buildConfigProperties
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
else: {
|
|
190
|
+
type: "object",
|
|
191
|
+
properties: buildConfigProperties
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const buildPreset = {
|
|
196
|
+
target: "buildPreset",
|
|
197
|
+
schema: {
|
|
198
|
+
if: { type: "string" },
|
|
199
|
+
then: {
|
|
200
|
+
enum: presets
|
|
201
|
+
},
|
|
202
|
+
else: { typeof: "function" }
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
const schema = [buildConfig, buildPreset];
|
|
206
|
+
|
|
207
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,UAAU;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AACF;AAEO,MAAM,UAAU;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,OAAiB,CAAC,KAAK,QAAQ;AAC/B,WAAO,CAAC,GAAG,KAAK,GAAG,QAAQ,IAAI,OAAK,GAAG,OAAO,GAAG,CAAC;AAAA,EACpD,GAAG,CAAC,CAAC;AACP;AACA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,IACL,QAAQ,CAAC,UAAU,UAAU;AAAA,EAC/B;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,cAAc;AAAA,IACZ,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,YAAY;AAAA,QACV,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C7B;AACF;AAEO,MAAM,SAAS,CAAC,aAAa,WAAW;","names":[],"sources":["../../src/config/schema.ts"],"sourcesContent":["export const targets = [\n 'es5',\n 'es6',\n 'es2015',\n 'es2016',\n 'es2017',\n 'es2018',\n 'es2019',\n 'es2020',\n 'es2021',\n 'es2022',\n // The default target is esnext which means that by default, assume all of the latest JavaScript and CSS features are supported.\n 'esnext',\n];\n\nexport const presets = [\n 'npm-library',\n 'npm-library-with-umd',\n 'npm-component',\n 'npm-component-with-umd',\n ...[\n 'npm-library',\n 'npm-library-with-umd',\n 'npm-component',\n 'npm-component-with-umd',\n ].reduce<string[]>((ret, crt) => {\n return [...ret, ...targets.map(t => `${crt}-${t}`)];\n }, []),\n];\nconst buildConfigProperties = {\n alias: {\n typeof: ['object', 'function'],\n },\n asset: {\n type: 'object',\n },\n autoExternal: {\n if: {\n type: 'object',\n },\n then: {\n properties: {\n dependencies: { type: 'boolean' },\n peerDependencies: { type: 'boolean' },\n },\n },\n else: { type: 'boolean' },\n },\n buildType: {\n enum: ['bundle', 'bundleless'],\n },\n copy: {\n type: 'object',\n properties: {\n patterns: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n from: { type: 'string' },\n to: { type: 'string' },\n context: { type: 'string' },\n globOptions: { type: 'object' },\n },\n },\n },\n options: {\n type: 'object',\n properties: {\n concurrency: {\n type: 'number',\n },\n },\n },\n },\n },\n define: {\n typeof: 'object',\n },\n dts: {\n if: { type: 'object' },\n then: {\n properties: {\n distPath: { type: 'string' },\n tsconfigPath: { type: 'string' },\n },\n },\n else: { type: 'boolean' },\n },\n externals: {\n type: 'array',\n items: {\n anyOf: [\n {\n instanceof: 'RegExp',\n },\n {\n typeof: 'string',\n },\n ],\n },\n },\n format: {\n enum: ['cjs', 'esm', 'iife', 'umd'],\n },\n input: {\n type: ['array', 'object'],\n },\n jsx: {\n enum: ['automatic', 'transform'],\n },\n minify: {\n if: {\n type: 'object',\n },\n else: { enum: ['esbuild', 'terser', false] },\n },\n outdir: { type: 'string' },\n platform: {\n enum: ['node', 'browser'],\n },\n sourceDir: {\n typeof: 'string',\n },\n sourceMap: {\n enum: [true, false, 'inline', 'external'],\n },\n splitting: {\n type: 'boolean',\n },\n style: {\n // TODO: add properties\n type: 'object',\n },\n target: {\n enum: targets,\n },\n umdGlobals: {\n type: 'object',\n },\n umdModuleName: {\n anyOf: [\n {\n instanceof: 'Function',\n },\n {\n typeof: 'string',\n },\n ],\n },\n};\nexport const buildConfig = {\n target: 'buildConfig',\n schema: {\n if: {\n type: 'array',\n },\n then: {\n items: [\n {\n type: 'object',\n properties: buildConfigProperties,\n },\n ],\n },\n else: {\n type: 'object',\n properties: buildConfigProperties,\n },\n },\n};\nexport const buildPreset = {\n target: 'buildPreset',\n schema: {\n if: { type: 'string' },\n then: {\n enum: presets,\n },\n else: { typeof: 'function' },\n },\n};\n\nexport const schema = [buildConfig, buildPreset];\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { PartialBuildConfig, PartialBaseBuildConfig, Target } from '../types';
|
|
2
|
+
export declare const targets: Target[];
|
|
3
|
+
export declare const basePresetConfig: PartialBuildConfig;
|
|
4
|
+
export declare const npmLibraryPresetConfig: PartialBaseBuildConfig[];
|
|
5
|
+
export declare const npmLibraryWithUmdPresetConfig: PartialBaseBuildConfig[];
|
|
6
|
+
export declare const npmComponentPresetConfig: PartialBaseBuildConfig[];
|
|
7
|
+
export declare const npmComponentWithUmdPresetConfig: PartialBaseBuildConfig[];
|
|
8
|
+
export declare const libraryPreset: {
|
|
9
|
+
'npm-library': PartialBaseBuildConfig[];
|
|
10
|
+
};
|
|
11
|
+
export declare const libraryPresetWithTarget: Record<"npm-library-es5" | "npm-library-esnext" | "npm-library-es6" | "npm-library-es2015" | "npm-library-es2016" | "npm-library-es2017" | "npm-library-es2018" | "npm-library-es2019" | "npm-library-es2020" | "npm-library-es2021" | "npm-library-es2022", PartialBuildConfig>;
|
|
12
|
+
export declare const libraryUmdPreset: {
|
|
13
|
+
'npm-library-with-umd': PartialBaseBuildConfig[];
|
|
14
|
+
};
|
|
15
|
+
export declare const libraryUmdPresetWithTarget: Record<"npm-library-with-umd-es5" | "npm-library-with-umd-esnext" | "npm-library-with-umd-es6" | "npm-library-with-umd-es2015" | "npm-library-with-umd-es2016" | "npm-library-with-umd-es2017" | "npm-library-with-umd-es2018" | "npm-library-with-umd-es2019" | "npm-library-with-umd-es2020" | "npm-library-with-umd-es2021" | "npm-library-with-umd-es2022", PartialBuildConfig>;
|
|
16
|
+
export declare const componentPreset: {
|
|
17
|
+
'npm-component': PartialBaseBuildConfig[];
|
|
18
|
+
};
|
|
19
|
+
export declare const componentPresetWithTarget: Record<"npm-component-es5" | "npm-component-esnext" | "npm-component-es6" | "npm-component-es2015" | "npm-component-es2016" | "npm-component-es2017" | "npm-component-es2018" | "npm-component-es2019" | "npm-component-es2020" | "npm-component-es2021" | "npm-component-es2022", PartialBuildConfig>;
|
|
20
|
+
export declare const componentUmdPreset: {
|
|
21
|
+
'npm-component-with-umd': PartialBaseBuildConfig[];
|
|
22
|
+
};
|
|
23
|
+
export declare const componentUmdPresetWithTarget: Record<"npm-component-with-umd-es5" | "npm-component-with-umd-esnext" | "npm-component-with-umd-es6" | "npm-component-with-umd-es2015" | "npm-component-with-umd-es2016" | "npm-component-with-umd-es2017" | "npm-component-with-umd-es2018" | "npm-component-with-umd-es2019" | "npm-component-with-umd-es2020" | "npm-component-with-umd-es2021" | "npm-component-with-umd-es2022", PartialBuildConfig>;
|
|
24
|
+
export declare const presetList: {
|
|
25
|
+
"npm-component-with-umd-es5": PartialBuildConfig;
|
|
26
|
+
"npm-component-with-umd-esnext": PartialBuildConfig;
|
|
27
|
+
"npm-component-with-umd-es6": PartialBuildConfig;
|
|
28
|
+
"npm-component-with-umd-es2015": PartialBuildConfig;
|
|
29
|
+
"npm-component-with-umd-es2016": PartialBuildConfig;
|
|
30
|
+
"npm-component-with-umd-es2017": PartialBuildConfig;
|
|
31
|
+
"npm-component-with-umd-es2018": PartialBuildConfig;
|
|
32
|
+
"npm-component-with-umd-es2019": PartialBuildConfig;
|
|
33
|
+
"npm-component-with-umd-es2020": PartialBuildConfig;
|
|
34
|
+
"npm-component-with-umd-es2021": PartialBuildConfig;
|
|
35
|
+
"npm-component-with-umd-es2022": PartialBuildConfig;
|
|
36
|
+
'npm-component-with-umd': PartialBaseBuildConfig[];
|
|
37
|
+
"npm-component-es5": PartialBuildConfig;
|
|
38
|
+
"npm-component-esnext": PartialBuildConfig;
|
|
39
|
+
"npm-component-es6": PartialBuildConfig;
|
|
40
|
+
"npm-component-es2015": PartialBuildConfig;
|
|
41
|
+
"npm-component-es2016": PartialBuildConfig;
|
|
42
|
+
"npm-component-es2017": PartialBuildConfig;
|
|
43
|
+
"npm-component-es2018": PartialBuildConfig;
|
|
44
|
+
"npm-component-es2019": PartialBuildConfig;
|
|
45
|
+
"npm-component-es2020": PartialBuildConfig;
|
|
46
|
+
"npm-component-es2021": PartialBuildConfig;
|
|
47
|
+
"npm-component-es2022": PartialBuildConfig;
|
|
48
|
+
'npm-component': PartialBaseBuildConfig[];
|
|
49
|
+
"npm-library-with-umd-es5": PartialBuildConfig;
|
|
50
|
+
"npm-library-with-umd-esnext": PartialBuildConfig;
|
|
51
|
+
"npm-library-with-umd-es6": PartialBuildConfig;
|
|
52
|
+
"npm-library-with-umd-es2015": PartialBuildConfig;
|
|
53
|
+
"npm-library-with-umd-es2016": PartialBuildConfig;
|
|
54
|
+
"npm-library-with-umd-es2017": PartialBuildConfig;
|
|
55
|
+
"npm-library-with-umd-es2018": PartialBuildConfig;
|
|
56
|
+
"npm-library-with-umd-es2019": PartialBuildConfig;
|
|
57
|
+
"npm-library-with-umd-es2020": PartialBuildConfig;
|
|
58
|
+
"npm-library-with-umd-es2021": PartialBuildConfig;
|
|
59
|
+
"npm-library-with-umd-es2022": PartialBuildConfig;
|
|
60
|
+
'npm-library-with-umd': PartialBaseBuildConfig[];
|
|
61
|
+
"npm-library-es5": PartialBuildConfig;
|
|
62
|
+
"npm-library-esnext": PartialBuildConfig;
|
|
63
|
+
"npm-library-es6": PartialBuildConfig;
|
|
64
|
+
"npm-library-es2015": PartialBuildConfig;
|
|
65
|
+
"npm-library-es2016": PartialBuildConfig;
|
|
66
|
+
"npm-library-es2017": PartialBuildConfig;
|
|
67
|
+
"npm-library-es2018": PartialBuildConfig;
|
|
68
|
+
"npm-library-es2019": PartialBuildConfig;
|
|
69
|
+
"npm-library-es2020": PartialBuildConfig;
|
|
70
|
+
"npm-library-es2021": PartialBuildConfig;
|
|
71
|
+
"npm-library-es2022": PartialBuildConfig;
|
|
72
|
+
'npm-library': PartialBaseBuildConfig[];
|
|
73
|
+
'base-config': PartialBaseBuildConfig;
|
|
74
|
+
};
|
|
75
|
+
export declare const BuildInPreset: {
|
|
76
|
+
BASE_CONFIG: PartialBaseBuildConfig;
|
|
77
|
+
NPM_LIBRARY: PartialBaseBuildConfig[];
|
|
78
|
+
NPM_LIBRARY_WITH_UMD: PartialBaseBuildConfig[];
|
|
79
|
+
NPM_COMPONENT: PartialBaseBuildConfig[];
|
|
80
|
+
NPM_COMPONENT_WITH_UMD: PartialBaseBuildConfig[];
|
|
81
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
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 stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
BuildInPreset: () => BuildInPreset,
|
|
21
|
+
basePresetConfig: () => basePresetConfig,
|
|
22
|
+
componentPreset: () => componentPreset,
|
|
23
|
+
componentPresetWithTarget: () => componentPresetWithTarget,
|
|
24
|
+
componentUmdPreset: () => componentUmdPreset,
|
|
25
|
+
componentUmdPresetWithTarget: () => componentUmdPresetWithTarget,
|
|
26
|
+
libraryPreset: () => libraryPreset,
|
|
27
|
+
libraryPresetWithTarget: () => libraryPresetWithTarget,
|
|
28
|
+
libraryUmdPreset: () => libraryUmdPreset,
|
|
29
|
+
libraryUmdPresetWithTarget: () => libraryUmdPresetWithTarget,
|
|
30
|
+
npmComponentPresetConfig: () => npmComponentPresetConfig,
|
|
31
|
+
npmComponentWithUmdPresetConfig: () => npmComponentWithUmdPresetConfig,
|
|
32
|
+
npmLibraryPresetConfig: () => npmLibraryPresetConfig,
|
|
33
|
+
npmLibraryWithUmdPresetConfig: () => npmLibraryWithUmdPresetConfig,
|
|
34
|
+
presetList: () => presetList,
|
|
35
|
+
targets: () => targets
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
38
|
+
var __defProp2 = Object.defineProperty;
|
|
39
|
+
var __defProps = Object.defineProperties;
|
|
40
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
41
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
42
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
43
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
44
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
45
|
+
var __spreadValues = (a, b) => {
|
|
46
|
+
for (var prop in b || (b = {}))
|
|
47
|
+
if (__hasOwnProp2.call(b, prop))
|
|
48
|
+
__defNormalProp(a, prop, b[prop]);
|
|
49
|
+
if (__getOwnPropSymbols)
|
|
50
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
51
|
+
if (__propIsEnum.call(b, prop))
|
|
52
|
+
__defNormalProp(a, prop, b[prop]);
|
|
53
|
+
}
|
|
54
|
+
return a;
|
|
55
|
+
};
|
|
56
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
57
|
+
const targets = [
|
|
58
|
+
"es5",
|
|
59
|
+
"es6",
|
|
60
|
+
"es2015",
|
|
61
|
+
"es2016",
|
|
62
|
+
"es2017",
|
|
63
|
+
"es2018",
|
|
64
|
+
"es2019",
|
|
65
|
+
"es2020",
|
|
66
|
+
"es2021",
|
|
67
|
+
"es2022",
|
|
68
|
+
"esnext"
|
|
69
|
+
];
|
|
70
|
+
const basePresetConfig = {
|
|
71
|
+
format: "esm",
|
|
72
|
+
target: "es6",
|
|
73
|
+
buildType: "bundle",
|
|
74
|
+
outdir: "./dist",
|
|
75
|
+
dts: { distPath: "./types" }
|
|
76
|
+
};
|
|
77
|
+
const npmLibraryPresetConfig = [
|
|
78
|
+
{
|
|
79
|
+
format: "cjs",
|
|
80
|
+
target: "es6",
|
|
81
|
+
buildType: "bundle",
|
|
82
|
+
outdir: "./dist/lib",
|
|
83
|
+
dts: false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
format: "esm",
|
|
87
|
+
target: "es6",
|
|
88
|
+
buildType: "bundle",
|
|
89
|
+
outdir: "./dist/es",
|
|
90
|
+
dts: false
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
buildType: "bundle",
|
|
94
|
+
dts: { only: true, distPath: "./types" }
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
const npmLibraryWithUmdPresetConfig = [
|
|
98
|
+
{
|
|
99
|
+
format: "cjs",
|
|
100
|
+
target: "es6",
|
|
101
|
+
buildType: "bundle",
|
|
102
|
+
outdir: "./dist/lib",
|
|
103
|
+
dts: false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
format: "esm",
|
|
107
|
+
target: "es6",
|
|
108
|
+
buildType: "bundle",
|
|
109
|
+
outdir: "./dist/es",
|
|
110
|
+
dts: false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
format: "umd",
|
|
114
|
+
target: "es6",
|
|
115
|
+
buildType: "bundle",
|
|
116
|
+
outdir: "./dist/umd",
|
|
117
|
+
dts: false
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
buildType: "bundle",
|
|
121
|
+
dts: { only: true, distPath: "./types" }
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
const npmComponentPresetConfig = [
|
|
125
|
+
{
|
|
126
|
+
format: "cjs",
|
|
127
|
+
target: "es6",
|
|
128
|
+
buildType: "bundleless",
|
|
129
|
+
outdir: "./dist/lib",
|
|
130
|
+
dts: false
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
format: "esm",
|
|
134
|
+
target: "es6",
|
|
135
|
+
buildType: "bundleless",
|
|
136
|
+
outdir: "./dist/es",
|
|
137
|
+
dts: false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
buildType: "bundleless",
|
|
141
|
+
outdir: "./dist/types",
|
|
142
|
+
dts: { only: true }
|
|
143
|
+
}
|
|
144
|
+
];
|
|
145
|
+
const npmComponentWithUmdPresetConfig = [
|
|
146
|
+
{
|
|
147
|
+
format: "cjs",
|
|
148
|
+
target: "es6",
|
|
149
|
+
buildType: "bundleless",
|
|
150
|
+
outdir: "./dist/lib",
|
|
151
|
+
dts: false
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
format: "esm",
|
|
155
|
+
target: "es6",
|
|
156
|
+
buildType: "bundleless",
|
|
157
|
+
outdir: "./dist/es",
|
|
158
|
+
dts: false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
format: "umd",
|
|
162
|
+
target: "es6",
|
|
163
|
+
buildType: "bundle",
|
|
164
|
+
outdir: "./dist/umd",
|
|
165
|
+
dts: false
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
buildType: "bundleless",
|
|
169
|
+
dts: { only: true, distPath: "./types" }
|
|
170
|
+
}
|
|
171
|
+
];
|
|
172
|
+
const libraryPreset = { "npm-library": npmLibraryPresetConfig };
|
|
173
|
+
const libraryPresetWithTarget = targets.reduce((ret, target) => {
|
|
174
|
+
ret[`npm-library-${target}`] = libraryPreset["npm-library"].map((config) => {
|
|
175
|
+
return __spreadProps(__spreadValues({}, config), { target });
|
|
176
|
+
});
|
|
177
|
+
return ret;
|
|
178
|
+
}, {});
|
|
179
|
+
const libraryUmdPreset = {
|
|
180
|
+
"npm-library-with-umd": npmLibraryWithUmdPresetConfig
|
|
181
|
+
};
|
|
182
|
+
const libraryUmdPresetWithTarget = targets.reduce((ret, target) => {
|
|
183
|
+
ret[`npm-library-with-umd-${target}`] = libraryUmdPreset["npm-library-with-umd"].map((config) => {
|
|
184
|
+
return __spreadProps(__spreadValues({}, config), { target });
|
|
185
|
+
});
|
|
186
|
+
return ret;
|
|
187
|
+
}, {});
|
|
188
|
+
const componentPreset = {
|
|
189
|
+
"npm-component": npmComponentPresetConfig
|
|
190
|
+
};
|
|
191
|
+
const componentPresetWithTarget = targets.reduce((ret, target) => {
|
|
192
|
+
ret[`npm-component-${target}`] = componentPreset["npm-component"].map(
|
|
193
|
+
(config) => {
|
|
194
|
+
return __spreadProps(__spreadValues({}, config), { target });
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
return ret;
|
|
198
|
+
}, {});
|
|
199
|
+
const componentUmdPreset = {
|
|
200
|
+
"npm-component-with-umd": npmComponentWithUmdPresetConfig
|
|
201
|
+
};
|
|
202
|
+
const componentUmdPresetWithTarget = targets.reduce((ret, target) => {
|
|
203
|
+
ret[`npm-component-with-umd-${target}`] = componentUmdPreset["npm-component-with-umd"].map((config) => {
|
|
204
|
+
return __spreadProps(__spreadValues({}, config), { target });
|
|
205
|
+
});
|
|
206
|
+
return ret;
|
|
207
|
+
}, {});
|
|
208
|
+
const presetList = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
209
|
+
"base-config": basePresetConfig
|
|
210
|
+
}, libraryPreset), libraryPresetWithTarget), libraryUmdPreset), libraryUmdPresetWithTarget), componentPreset), componentPresetWithTarget), componentUmdPreset), componentUmdPresetWithTarget);
|
|
211
|
+
const BuildInPreset = {
|
|
212
|
+
BASE_CONFIG: basePresetConfig,
|
|
213
|
+
NPM_LIBRARY: npmLibraryPresetConfig,
|
|
214
|
+
NPM_LIBRARY_WITH_UMD: npmLibraryWithUmdPresetConfig,
|
|
215
|
+
NPM_COMPONENT: npmComponentPresetConfig,
|
|
216
|
+
NPM_COMPONENT_WITH_UMD: npmComponentWithUmdPresetConfig
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=build-presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,UAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,mBAAuC;AAAA,EAClD,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,KAAK,EAAE,UAAU,UAAU;AAC7B;AAEO,MAAM,yBAAmD;AAAA,EAC9D;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,KAAK;AAAA,E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6BACA,kBACA,4BACA,qBACA;AAGE,MAAM,gBAAgB;AAAA,EAC3B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,wBAAwB;AAC1B;","names":[],"sources":["../../src/constants/build-presets.ts"],"sourcesContent":["import type {\n PartialBuildConfig,\n PartialBaseBuildConfig,\n Target,\n} from '../types';\n\nexport const targets: Target[] = [\n 'es5',\n 'es6',\n 'es2015',\n 'es2016',\n 'es2017',\n 'es2018',\n 'es2019',\n 'es2020',\n 'es2021',\n 'es2022',\n 'esnext',\n];\n\nexport const basePresetConfig: PartialBuildConfig = {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist',\n dts: { distPath: './types' },\n};\n\nexport const npmLibraryPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist/es',\n dts: false,\n },\n {\n buildType: 'bundle',\n dts: { only: true, distPath: './types' },\n },\n];\nexport const npmLibraryWithUmdPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist/es',\n dts: false,\n },\n {\n format: 'umd',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist/umd',\n dts: false,\n },\n {\n buildType: 'bundle',\n dts: { only: true, distPath: './types' },\n },\n];\nexport const npmComponentPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundleless',\n outdir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundleless',\n outdir: './dist/es',\n dts: false,\n },\n {\n buildType: 'bundleless',\n outdir: './dist/types',\n dts: { only: true },\n },\n];\nexport const npmComponentWithUmdPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundleless',\n outdir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundleless',\n outdir: './dist/es',\n dts: false,\n },\n {\n format: 'umd',\n target: 'es6',\n buildType: 'bundle',\n outdir: './dist/umd',\n dts: false,\n },\n {\n buildType: 'bundleless',\n dts: { only: true, distPath: './types' },\n },\n];\n\nexport const libraryPreset = { 'npm-library': npmLibraryPresetConfig };\n\nexport const libraryPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-library-${target}`] = libraryPreset['npm-library'].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-library-${Target}`, PartialBuildConfig>);\n\nexport const libraryUmdPreset = {\n 'npm-library-with-umd': npmLibraryWithUmdPresetConfig,\n};\nexport const libraryUmdPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-library-with-umd-${target}`] = libraryUmdPreset[\n 'npm-library-with-umd'\n ].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-library-with-umd-${Target}`, PartialBuildConfig>);\n\nexport const componentPreset = {\n 'npm-component': npmComponentPresetConfig,\n};\nexport const componentPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-component-${target}`] = componentPreset['npm-component'].map(\n config => {\n return { ...config, target };\n },\n );\n return ret;\n}, {} as Record<`npm-component-${Target}`, PartialBuildConfig>);\n\nexport const componentUmdPreset = {\n 'npm-component-with-umd': npmComponentWithUmdPresetConfig,\n};\nexport const componentUmdPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-component-with-umd-${target}`] = componentUmdPreset[\n 'npm-component-with-umd'\n ].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-component-with-umd-${Target}`, PartialBuildConfig>);\n\nexport const presetList = {\n 'base-config': basePresetConfig,\n ...libraryPreset,\n ...libraryPresetWithTarget,\n ...libraryUmdPreset,\n ...libraryUmdPresetWithTarget,\n ...componentPreset,\n ...componentPresetWithTarget,\n ...componentUmdPreset,\n ...componentUmdPresetWithTarget,\n};\n\nexport const BuildInPreset = {\n BASE_CONFIG: basePresetConfig,\n NPM_LIBRARY: npmLibraryPresetConfig,\n NPM_LIBRARY_WITH_UMD: npmLibraryWithUmdPresetConfig,\n NPM_COMPONENT: npmComponentPresetConfig,\n NPM_COMPONENT_WITH_UMD: npmComponentWithUmdPresetConfig,\n};\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
buildFailText: () => buildFailText,
|
|
21
|
+
buildSuccessText: () => buildSuccessText,
|
|
22
|
+
buildingText: () => buildingText,
|
|
23
|
+
defaultBuildConfig: () => defaultBuildConfig
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
26
|
+
var import_utils = require("@modern-js/utils");
|
|
27
|
+
const buildingText = import_utils.chalk.blue("Building...");
|
|
28
|
+
const buildSuccessText = import_utils.chalk.green("Build succeed");
|
|
29
|
+
const buildFailText = import_utils.chalk.red("Build Failed:");
|
|
30
|
+
const defaultBuildConfig = Object.freeze({
|
|
31
|
+
buildType: "bundle",
|
|
32
|
+
format: "cjs",
|
|
33
|
+
target: "esnext",
|
|
34
|
+
sourceMap: false,
|
|
35
|
+
copy: {},
|
|
36
|
+
outdir: "./dist",
|
|
37
|
+
dts: Object.freeze({
|
|
38
|
+
only: false,
|
|
39
|
+
distPath: "./",
|
|
40
|
+
tsconfigPath: "./tsconfig.json"
|
|
41
|
+
}),
|
|
42
|
+
jsx: "automatic",
|
|
43
|
+
input: ["src/index.ts"],
|
|
44
|
+
platform: "node",
|
|
45
|
+
splitting: false,
|
|
46
|
+
externals: [],
|
|
47
|
+
minify: false,
|
|
48
|
+
autoExternal: true,
|
|
49
|
+
umdGlobals: {},
|
|
50
|
+
sourceDir: "./src",
|
|
51
|
+
alias: {},
|
|
52
|
+
umdModuleName: (name) => name,
|
|
53
|
+
define: {},
|
|
54
|
+
asset: {
|
|
55
|
+
path: "assets",
|
|
56
|
+
limit: 14336,
|
|
57
|
+
publicPath: "",
|
|
58
|
+
svgr: true
|
|
59
|
+
},
|
|
60
|
+
style: {
|
|
61
|
+
less: {},
|
|
62
|
+
sass: {},
|
|
63
|
+
postcss: {},
|
|
64
|
+
tailwindCss: {},
|
|
65
|
+
inject: false,
|
|
66
|
+
autoModules: true,
|
|
67
|
+
modules: {}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAGf,MAAM,eAAe,mBAAM,KAAK,aAAa;AAC7C,MAAM,mBAAmB,mBAAM,MAAM,eAAe;AACpD,MAAM,gBAAgB,mBAAM,IAAI,eAAe;AAE/C,MAAM,qBAAqB,OAAO,OAAwB;AAAA,EAC/D,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,MAAM,CAAC;AAAA,EACP,QAAQ;AAAA,EACR,KAAK,OAAO,OAAO;AAAA,IACjB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,cAAc;AAAA,EAChB,CAAC;AAAA,EACD,KAAK;AAAA,EACL,OAAO,CAAC,cAAc;AAAA,EACtB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW,CAAC;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,YAAY,CAAC;AAAA,EACb,WAAW;AAAA,EACX,OAAO,CAAC;AAAA,EACR,eAAe,UAAQ;AAAA,EACvB,QAAQ,CAAC;AAAA,EACT,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,MAAM,CAAC;AAAA,IACP,MAAM,CAAC;AAAA,IACP,SAAS,CAAC;AAAA,IACV,aAAa,CAAC;AAAA,IACd,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,SAAS,CAAC;AAAA,EACZ;AACF,CAAC;","names":[],"sources":["../../src/constants/build.ts"],"sourcesContent":["import { chalk } from '@modern-js/utils';\nimport type { BaseBuildConfig } from '../types';\n\nexport const buildingText = chalk.blue('Building...');\nexport const buildSuccessText = chalk.green('Build succeed');\nexport const buildFailText = chalk.red('Build Failed:');\n\nexport const defaultBuildConfig = Object.freeze<BaseBuildConfig>({\n buildType: 'bundle',\n format: 'cjs',\n target: 'esnext',\n sourceMap: false,\n copy: {},\n outdir: './dist',\n dts: Object.freeze({\n only: false,\n distPath: './',\n tsconfigPath: './tsconfig.json',\n }),\n jsx: 'automatic',\n input: ['src/index.ts'],\n platform: 'node',\n splitting: false,\n externals: [],\n minify: false,\n autoExternal: true,\n umdGlobals: {},\n sourceDir: './src',\n alias: {},\n umdModuleName: name => name,\n define: {},\n asset: {\n path: 'assets',\n limit: 14336,\n publicPath: '',\n svgr: true,\n },\n style: {\n less: {},\n sass: {},\n postcss: {},\n tailwindCss: {},\n inject: false,\n autoModules: true,\n modules: {},\n },\n});\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
blue: () => blue,
|
|
21
|
+
gray: () => gray,
|
|
22
|
+
purple: () => purple
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
25
|
+
const purple = [115, 22, 192];
|
|
26
|
+
const blue = [82, 221, 252];
|
|
27
|
+
const gray = [36, 2, 45];
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAEO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,SAAc,CAAC,KAAK,IAAI,GAAG;AACjC,MAAM,OAAY,CAAC,IAAI,KAAK,GAAG;AAC/B,MAAM,OAAY,CAAC,IAAI,GAAG,EAAE;","names":[],"sources":["../../src/constants/colors.ts"],"sourcesContent":["import type { RGB } from '../types/color';\n\nexport const purple: RGB = [115, 22, 192];\nexport const blue: RGB = [82, 221, 252];\nexport const gray: RGB = [36, 2, 45];\n"]}
|