@modern-js/module-tools 2.0.0-beta.4 → 2.0.0-beta.7
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 +152 -0
- package/dist/build.d.ts +3 -0
- package/dist/build.js +73 -0
- package/dist/build.js.map +1 -0
- package/dist/builder/build.js +55 -51
- package/dist/builder/build.js.map +1 -1
- package/dist/builder/clear.js +17 -24
- package/dist/builder/clear.js.map +1 -1
- package/dist/builder/copy.d.ts +2 -0
- package/dist/builder/copy.js +45 -56
- package/dist/builder/copy.js.map +1 -1
- package/dist/builder/dts/index.js +8 -3
- package/dist/builder/dts/index.js.map +1 -1
- package/dist/builder/dts/rollup.js +39 -52
- package/dist/builder/dts/rollup.js.map +1 -1
- package/dist/builder/dts/tsc.js +28 -35
- package/dist/builder/dts/tsc.js.map +1 -1
- package/dist/builder/index.js +15 -31
- package/dist/builder/index.js.map +1 -1
- package/dist/builder/platform.js +74 -68
- package/dist/builder/platform.js.map +1 -1
- package/dist/cli.js +16 -24
- package/dist/cli.js.map +1 -1
- package/dist/command.js +47 -60
- package/dist/command.js.map +1 -1
- package/dist/config/defineConfig.js +7 -3
- package/dist/config/defineConfig.js.map +1 -1
- package/dist/config/normalize.js +32 -41
- package/dist/config/normalize.js.map +1 -1
- package/dist/config/schema.d.ts +4 -4
- package/dist/config/schema.js +12 -4
- package/dist/config/schema.js.map +1 -1
- package/dist/constants/build-presets.js +51 -34
- package/dist/constants/build-presets.js.map +1 -1
- package/dist/constants/build.js +11 -4
- package/dist/constants/build.js.map +1 -1
- package/dist/constants/colors.js +9 -3
- package/dist/constants/colors.js.map +1 -1
- package/dist/constants/dts.js +10 -3
- package/dist/constants/dts.js.map +1 -1
- package/dist/constants/file.js +9 -3
- package/dist/constants/file.js.map +1 -1
- package/dist/constants/legacy-build-presets.js +31 -22
- package/dist/constants/legacy-build-presets.js.map +1 -1
- package/dist/constants/log.js +10 -3
- package/dist/constants/log.js.map +1 -1
- package/dist/dev.d.ts +1 -1
- package/dist/dev.js +26 -35
- package/dist/dev.js.map +1 -1
- package/dist/error.js +12 -3
- package/dist/error.js.map +1 -1
- package/dist/hooks/build.d.ts +5 -8
- package/dist/hooks/build.js +8 -4
- package/dist/hooks/build.js.map +1 -1
- package/dist/hooks/dev.d.ts +1 -1
- package/dist/hooks/dev.js +8 -4
- package/dist/hooks/dev.js.map +1 -1
- package/dist/hooks/index.d.ts +6 -9
- package/dist/hooks/index.js +21 -19
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/misc.js +7 -3
- package/dist/hooks/misc.js.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/locale/en.d.ts +1 -0
- package/dist/locale/en.js +11 -4
- package/dist/locale/en.js.map +1 -1
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/index.js +8 -3
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/zh.d.ts +1 -0
- package/dist/locale/zh.js +11 -4
- package/dist/locale/zh.js.map +1 -1
- package/dist/plugins.js +7 -3
- package/dist/plugins.js.map +1 -1
- package/dist/types/color.js +17 -0
- package/dist/types/color.js.map +1 -0
- package/dist/types/command.d.ts +2 -1
- package/dist/types/command.js +17 -0
- package/dist/types/command.js.map +1 -0
- package/dist/types/config/index.d.ts +3 -6
- package/dist/types/config/index.js +3 -3
- package/dist/types/config/index.js.map +1 -1
- package/dist/types/config/style.js +17 -0
- package/dist/types/config/style.js.map +1 -0
- package/dist/types/context.js +17 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/copy.js +17 -0
- package/dist/types/copy.js.map +1 -0
- package/dist/types/dts.js +17 -0
- package/dist/types/dts.js.map +1 -0
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/hooks.js +17 -0
- package/dist/types/hooks.js.map +1 -0
- package/dist/types/index.js +7 -7
- package/dist/types/index.js.map +1 -1
- package/dist/types/utils.js +17 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/utils/builder.js +13 -26
- package/dist/utils/builder.js.map +1 -1
- package/dist/utils/config.js +33 -38
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/context.js +14 -22
- package/dist/utils/context.js.map +1 -1
- package/dist/utils/dts.js +39 -50
- package/dist/utils/dts.js.map +1 -1
- package/dist/utils/input.js +19 -30
- package/dist/utils/input.js.map +1 -1
- package/dist/utils/language.js +17 -24
- package/dist/utils/language.js.map +1 -1
- package/dist/utils/libuild-plugins.js +16 -23
- package/dist/utils/libuild-plugins.js.map +1 -1
- package/dist/utils/log.js +15 -23
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/onExit.js +14 -22
- package/dist/utils/onExit.js.map +1 -1
- package/dist/utils/path.js +11 -25
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/style.js +20 -25
- package/dist/utils/style.js.map +1 -1
- package/dist/utils/tspaths-transform.js +7 -3
- package/dist/utils/tspaths-transform.js.map +1 -1
- package/package.json +13 -15
package/dist/config/normalize.js
CHANGED
|
@@ -21,35 +21,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
mod
|
|
22
22
|
));
|
|
23
23
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
-
var stdin_exports = {};
|
|
25
|
-
__export(stdin_exports, {
|
|
26
|
-
checkConfig: () => checkConfig,
|
|
27
|
-
normalizeBuildConfig: () => normalizeBuildConfig,
|
|
28
|
-
requiredBuildConfig: () => requiredBuildConfig,
|
|
29
|
-
transformBuildConfigToBaseConfigs: () => transformBuildConfigToBaseConfigs,
|
|
30
|
-
transformBuildPresetToBaseConfigs: () => transformBuildPresetToBaseConfigs,
|
|
31
|
-
transformToAbsPath: () => transformToAbsPath
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(stdin_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
|
-
var __create2 = Object.create;
|
|
36
|
-
var __defProp2 = Object.defineProperty;
|
|
37
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
38
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
39
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
40
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
41
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
42
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
-
for (let key of __getOwnPropNames2(from))
|
|
44
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
45
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
48
|
-
};
|
|
49
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
50
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
51
|
-
mod
|
|
52
|
-
));
|
|
53
24
|
var __async = (__this, __arguments, generator) => {
|
|
54
25
|
return new Promise((resolve, reject) => {
|
|
55
26
|
var fulfilled = (value) => {
|
|
@@ -70,9 +41,20 @@ var __async = (__this, __arguments, generator) => {
|
|
|
70
41
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
71
42
|
});
|
|
72
43
|
};
|
|
44
|
+
var normalize_exports = {};
|
|
45
|
+
__export(normalize_exports, {
|
|
46
|
+
checkConfig: () => checkConfig,
|
|
47
|
+
normalizeBuildConfig: () => normalizeBuildConfig,
|
|
48
|
+
requiredBuildConfig: () => requiredBuildConfig,
|
|
49
|
+
transformBuildConfigToBaseConfigs: () => transformBuildConfigToBaseConfigs,
|
|
50
|
+
transformBuildPresetToBaseConfigs: () => transformBuildPresetToBaseConfigs,
|
|
51
|
+
transformToAbsPath: () => transformToAbsPath
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(normalize_exports);
|
|
54
|
+
var import_path = __toESM(require("path"));
|
|
73
55
|
const transformBuildPresetToBaseConfigs = (options, preset) => __async(void 0, null, function* () {
|
|
74
|
-
const { BuildInPreset, presetList } = yield Promise.resolve().then(() =>
|
|
75
|
-
const { addInputToPreset } = yield Promise.resolve().then(() =>
|
|
56
|
+
const { BuildInPreset, presetList } = yield Promise.resolve().then(() => __toESM(require("../constants/build-presets")));
|
|
57
|
+
const { addInputToPreset } = yield Promise.resolve().then(() => __toESM(require("../utils/input")));
|
|
76
58
|
if (typeof preset === "function") {
|
|
77
59
|
const partialBuildConfig = yield preset({ preset: BuildInPreset });
|
|
78
60
|
if (!partialBuildConfig) {
|
|
@@ -90,16 +72,16 @@ const transformBuildPresetToBaseConfigs = (options, preset) => __async(void 0, n
|
|
|
90
72
|
);
|
|
91
73
|
}
|
|
92
74
|
return transformBuildConfigToBaseConfigs(
|
|
93
|
-
yield addInputToPreset(presetList["
|
|
75
|
+
yield addInputToPreset(presetList["npm-library"], options.context),
|
|
94
76
|
options
|
|
95
77
|
);
|
|
96
78
|
});
|
|
97
79
|
const transformBuildConfigToBaseConfigs = (config, options) => __async(void 0, null, function* () {
|
|
98
|
-
const { validPartialBuildConfig } = yield Promise.resolve().then(() =>
|
|
80
|
+
const { validPartialBuildConfig } = yield Promise.resolve().then(() => __toESM(require("../utils/config")));
|
|
99
81
|
validPartialBuildConfig(config);
|
|
100
82
|
const { buildCmdOptions } = options;
|
|
101
|
-
const { ensureArray } = yield Promise.resolve().then(() =>
|
|
102
|
-
const { assignTsConfigPath } = yield Promise.resolve().then(() =>
|
|
83
|
+
const { ensureArray } = yield Promise.resolve().then(() => __toESM(require("@modern-js/utils")));
|
|
84
|
+
const { assignTsConfigPath } = yield Promise.resolve().then(() => __toESM(require("../utils/dts")));
|
|
103
85
|
const partialConfigs = ensureArray(config);
|
|
104
86
|
const configs = yield Promise.all(
|
|
105
87
|
partialConfigs.map((config2) => __async(void 0, null, function* () {
|
|
@@ -112,7 +94,7 @@ const transformBuildConfigToBaseConfigs = (config, options) => __async(void 0, n
|
|
|
112
94
|
return configs;
|
|
113
95
|
});
|
|
114
96
|
const requiredBuildConfig = (partialBuildConfig, context) => __async(void 0, null, function* () {
|
|
115
|
-
const { mergeDefaultBaseConfig } = yield Promise.resolve().then(() =>
|
|
97
|
+
const { mergeDefaultBaseConfig } = yield Promise.resolve().then(() => __toESM(require("../utils/config")));
|
|
116
98
|
const mergedConfig = yield mergeDefaultBaseConfig(
|
|
117
99
|
partialBuildConfig,
|
|
118
100
|
context
|
|
@@ -120,11 +102,11 @@ const requiredBuildConfig = (partialBuildConfig, context) => __async(void 0, nul
|
|
|
120
102
|
return mergedConfig;
|
|
121
103
|
});
|
|
122
104
|
const transformToAbsPath = (baseConfig, options) => __async(void 0, null, function* () {
|
|
123
|
-
const { slash } = yield Promise.resolve().then(() =>
|
|
105
|
+
const { slash } = yield Promise.resolve().then(() => __toESM(require("@modern-js/utils")));
|
|
124
106
|
const newConfig = baseConfig;
|
|
125
|
-
const { normalizeInput } = yield Promise.resolve().then(() =>
|
|
107
|
+
const { normalizeInput } = yield Promise.resolve().then(() => __toESM(require("../utils/input")));
|
|
126
108
|
const { context } = options;
|
|
127
|
-
newConfig.
|
|
109
|
+
newConfig.outDir = import_path.default.isAbsolute(newConfig.outDir) ? newConfig.outDir : import_path.default.join(context.appDirectory, newConfig.outDir);
|
|
128
110
|
newConfig.sourceDir = slash(
|
|
129
111
|
import_path.default.resolve(context.appDirectory, baseConfig.sourceDir)
|
|
130
112
|
);
|
|
@@ -133,7 +115,7 @@ const transformToAbsPath = (baseConfig, options) => __async(void 0, null, functi
|
|
|
133
115
|
});
|
|
134
116
|
if (newConfig.dts) {
|
|
135
117
|
newConfig.dts.distPath = import_path.default.join(
|
|
136
|
-
newConfig.
|
|
118
|
+
newConfig.outDir,
|
|
137
119
|
newConfig.dts.distPath
|
|
138
120
|
);
|
|
139
121
|
newConfig.dts.tsconfigPath = import_path.default.join(
|
|
@@ -146,7 +128,7 @@ const transformToAbsPath = (baseConfig, options) => __async(void 0, null, functi
|
|
|
146
128
|
const checkConfig = (config) => __async(void 0, null, function* () {
|
|
147
129
|
const { buildConfig, buildPreset } = config;
|
|
148
130
|
if (buildConfig && buildPreset) {
|
|
149
|
-
const { logger } = yield Promise.resolve().then(() =>
|
|
131
|
+
const { logger } = yield Promise.resolve().then(() => __toESM(require("@modern-js/utils")));
|
|
150
132
|
logger.warn(
|
|
151
133
|
`因为同时出现 'buildConfig' 和 'buildPreset' 配置,因此仅 'buildConfig' 配置生效`
|
|
152
134
|
);
|
|
@@ -173,5 +155,14 @@ const normalizeBuildConfig = (api, context, buildCmdOptions) => __async(void 0,
|
|
|
173
155
|
}
|
|
174
156
|
return baseConfigs;
|
|
175
157
|
});
|
|
158
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
159
|
+
0 && (module.exports = {
|
|
160
|
+
checkConfig,
|
|
161
|
+
normalizeBuildConfig,
|
|
162
|
+
requiredBuildConfig,
|
|
163
|
+
transformBuildConfigToBaseConfigs,
|
|
164
|
+
transformBuildPresetToBaseConfigs,
|
|
165
|
+
transformToAbsPath
|
|
166
|
+
});
|
|
176
167
|
|
|
177
168
|
//# sourceMappingURL=normalize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAaV,MAAM,oCAAoC,CAC/C,SAIA,WAC+B;AAC/B,QAAM,EAAE,eAAe,WAAW,IAAI,MAAM,6CAC1C;AAEF,QAAM,EAAE,iBAAiB,IAAI,MAAM,6CAAO;AAE1C,MAAI,OAAO,WAAW,YAAY;AAChC,UAAM,qBAAqB,MAAM,OAAO,EAAE,QAAQ,cAAc,CAAC;AAEjE,QAAI,CAAC,oBAAoB;AACvB,YAAM,IAA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,UAAU,MAAM,IAC/C,UAAU,SACV,oBAAK,KAAK,QAAQ,cAAc,UAAU,MAAM;AAEpD,YAAU,YAAY;AAAA,IACpB,oBAAK,QAAQ,QAAQ,cAAc,WAAW,SAAS;AAAA,EACzD;AACA,YAAU,QAAQ,MAAM,eAAe,WAAW;AAAA,IAChD,cAAc,QAAQ;AAAA,EACxB,CAAC;AAGD,MAAI,UAAU,KAAK;AACjB,cAAU,IAAI,WAAW,oBAAK;AAAA,MAC5B,UAAU;AAAA,MACV,UAAU,IAAI;AAAA,IAChB;AACA,cAAU,IAAI,eAAe,oBAAK;AAAA,MAChC,QAAQ;AAAA,MACR,UAAU,IAAI;AAAA,IAChB;AAAA,EACF;AAIA,SAAO;AACT;AAEO,MAAM,cAAc,CAAO,WAA6B;AAC7D,QAAM,EAAE,aAAa,YAAY,IAAI;AACrC,MAAI,eAAe,aAAa;AAC9B,UAAM,EAAE,OAAO,IAAI,MAAM,6CAAO;AAChC,WAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,uBAAuB,CAClC,KACA,SACA,oBAC+B;AAC/B,QAAM,SAAS,IAAI,yBAAyB;AAC5C,QAAM,EAAE,aAAa,YAAY,IAAI;AAErC,QAAM,YAAY,MAAM;AAExB,MAAI;AAGJ,MAAI,aAAa;AACf,kBAAc,MAAM,kCAAkC,aAAa;AAAA,MACjE;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,OAAO;AACL,kBAAc,MAAM;AAAA,MAClB;AAAA,QACE;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;;;;;;;;;;","names":["config"],"sources":["../../src/config/normalize.ts"],"sourcesContent":["import path from 'path';\nimport type { PluginAPI } from '@modern-js/core';\nimport type {\n ModuleUserConfig,\n BaseBuildConfig,\n BuildPreset,\n PartialBuildConfig,\n PartialBaseBuildConfig,\n ModuleContext,\n BuildCommandOptions,\n ModuleTools,\n} from '../types';\n\nexport const transformBuildPresetToBaseConfigs = async (\n options: {\n context: ModuleContext;\n buildCmdOptions: BuildCommandOptions;\n },\n preset?: BuildPreset,\n): Promise<BaseBuildConfig[]> => {\n const { BuildInPreset, presetList } = await import(\n '../constants/build-presets'\n );\n const { addInputToPreset } = await import('../utils/input');\n\n if (typeof preset === 'function') {\n const partialBuildConfig = await preset({ preset: BuildInPreset });\n\n if (!partialBuildConfig) {\n throw new Error(\n 'The `buildPreset` function does not allow no return value',\n );\n }\n\n return transformBuildConfigToBaseConfigs(partialBuildConfig, options);\n }\n\n const inPresetList = (p: string): p is keyof typeof presetList =>\n p in presetList;\n\n if (preset && inPresetList(preset)) {\n return transformBuildConfigToBaseConfigs(\n await addInputToPreset(presetList[preset], options.context),\n options,\n );\n }\n\n // buildConfig and buildPreset is undefined\n return transformBuildConfigToBaseConfigs(\n await addInputToPreset(presetList['npm-library'], options.context),\n options,\n );\n};\n\nexport const transformBuildConfigToBaseConfigs = async (\n config: PartialBuildConfig,\n options: {\n buildCmdOptions: BuildCommandOptions;\n context: ModuleContext;\n },\n): Promise<BaseBuildConfig[]> => {\n const { validPartialBuildConfig } = await import('../utils/config');\n validPartialBuildConfig(config);\n const { buildCmdOptions } = options;\n const { ensureArray } = await import('@modern-js/utils');\n const { assignTsConfigPath } = await import('../utils/dts');\n const partialConfigs = ensureArray(config);\n const configs = await Promise.all(\n partialConfigs.map(async config => {\n let newConfig = await requiredBuildConfig(config, options.context);\n newConfig = await assignTsConfigPath(newConfig, buildCmdOptions);\n newConfig = await transformToAbsPath(newConfig, options);\n return newConfig;\n }),\n );\n return configs;\n};\n\nexport const requiredBuildConfig = async (\n partialBuildConfig: PartialBaseBuildConfig,\n context: ModuleContext,\n): Promise<BaseBuildConfig> => {\n const { mergeDefaultBaseConfig } = await import('../utils/config');\n const mergedConfig = await mergeDefaultBaseConfig(\n partialBuildConfig,\n context,\n );\n return mergedConfig;\n};\n\nexport const transformToAbsPath = async (\n baseConfig: BaseBuildConfig,\n options: { context: ModuleContext; buildCmdOptions: BuildCommandOptions },\n) => {\n const { slash } = await import('@modern-js/utils');\n const newConfig = baseConfig;\n const { normalizeInput } = await import('../utils/input');\n const { context } = options;\n\n newConfig.outDir = path.isAbsolute(newConfig.outDir)\n ? newConfig.outDir\n : path.join(context.appDirectory, newConfig.outDir);\n\n newConfig.sourceDir = slash(\n path.resolve(context.appDirectory, baseConfig.sourceDir),\n );\n newConfig.input = await normalizeInput(newConfig, {\n appDirectory: context.appDirectory,\n });\n\n // dts path\n if (newConfig.dts) {\n newConfig.dts.distPath = path.join(\n newConfig.outDir,\n newConfig.dts.distPath,\n );\n newConfig.dts.tsconfigPath = path.join(\n context.appDirectory,\n newConfig.dts.tsconfigPath,\n );\n }\n\n // Maybe need transform 'config.copy'\n\n return newConfig;\n};\n\nexport const checkConfig = async (config: ModuleUserConfig) => {\n const { buildConfig, buildPreset } = config;\n if (buildConfig && buildPreset) {\n const { logger } = await import('@modern-js/utils');\n logger.warn(\n `因为同时出现 'buildConfig' 和 'buildPreset' 配置,因此仅 'buildConfig' 配置生效`,\n );\n }\n};\n\nexport const normalizeBuildConfig = async (\n api: PluginAPI<ModuleTools>,\n context: ModuleContext,\n buildCmdOptions: BuildCommandOptions,\n): Promise<BaseBuildConfig[]> => {\n const config = api.useResolvedConfigContext() as unknown as ModuleUserConfig;\n const { buildConfig, buildPreset } = config;\n\n await checkConfig(config);\n\n let baseConfigs: BaseBuildConfig[];\n\n // buildConfig High priority\n if (buildConfig) {\n baseConfigs = await transformBuildConfigToBaseConfigs(buildConfig, {\n buildCmdOptions,\n context,\n });\n } else {\n baseConfigs = await transformBuildPresetToBaseConfigs(\n {\n context,\n buildCmdOptions,\n },\n buildPreset,\n );\n }\n\n return baseConfigs;\n};\n"]}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export declare const buildConfig: {
|
|
|
120
120
|
enum: (string | boolean)[];
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
outDir: {
|
|
124
124
|
type: string;
|
|
125
125
|
};
|
|
126
126
|
platform: {
|
|
@@ -269,7 +269,7 @@ export declare const buildConfig: {
|
|
|
269
269
|
enum: (string | boolean)[];
|
|
270
270
|
};
|
|
271
271
|
};
|
|
272
|
-
|
|
272
|
+
outDir: {
|
|
273
273
|
type: string;
|
|
274
274
|
};
|
|
275
275
|
platform: {
|
|
@@ -440,7 +440,7 @@ export declare const schema: ({
|
|
|
440
440
|
enum: (string | boolean)[];
|
|
441
441
|
};
|
|
442
442
|
};
|
|
443
|
-
|
|
443
|
+
outDir: {
|
|
444
444
|
type: string;
|
|
445
445
|
};
|
|
446
446
|
platform: {
|
|
@@ -589,7 +589,7 @@ export declare const schema: ({
|
|
|
589
589
|
enum: (string | boolean)[];
|
|
590
590
|
};
|
|
591
591
|
};
|
|
592
|
-
|
|
592
|
+
outDir: {
|
|
593
593
|
type: string;
|
|
594
594
|
};
|
|
595
595
|
platform: {
|
package/dist/config/schema.js
CHANGED
|
@@ -15,15 +15,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var schema_exports = {};
|
|
19
|
+
__export(schema_exports, {
|
|
20
20
|
buildConfig: () => buildConfig,
|
|
21
21
|
buildPreset: () => buildPreset,
|
|
22
22
|
presets: () => presets,
|
|
23
23
|
schema: () => schema,
|
|
24
24
|
targets: () => targets
|
|
25
25
|
});
|
|
26
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(schema_exports);
|
|
27
27
|
const targets = [
|
|
28
28
|
"es5",
|
|
29
29
|
"es6",
|
|
@@ -139,7 +139,7 @@ const buildConfigProperties = {
|
|
|
139
139
|
},
|
|
140
140
|
else: { enum: ["esbuild", "terser", false] }
|
|
141
141
|
},
|
|
142
|
-
|
|
142
|
+
outDir: { type: "string" },
|
|
143
143
|
platform: {
|
|
144
144
|
enum: ["node", "browser"]
|
|
145
145
|
},
|
|
@@ -203,5 +203,13 @@ const buildPreset = {
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
const schema = [buildConfig, buildPreset];
|
|
206
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
207
|
+
0 && (module.exports = {
|
|
208
|
+
buildConfig,
|
|
209
|
+
buildPreset,
|
|
210
|
+
presets,
|
|
211
|
+
schema,
|
|
212
|
+
targets
|
|
213
|
+
});
|
|
206
214
|
|
|
207
215
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,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,cAAc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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"]}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
5
22
|
var __export = (target, all) => {
|
|
6
23
|
for (var name in all)
|
|
7
24
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -15,8 +32,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
32
|
return to;
|
|
16
33
|
};
|
|
17
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
35
|
+
var build_presets_exports = {};
|
|
36
|
+
__export(build_presets_exports, {
|
|
20
37
|
BuildInPreset: () => BuildInPreset,
|
|
21
38
|
basePresetConfig: () => basePresetConfig,
|
|
22
39
|
componentPreset: () => componentPreset,
|
|
@@ -34,26 +51,7 @@ __export(stdin_exports, {
|
|
|
34
51
|
presetList: () => presetList,
|
|
35
52
|
targets: () => targets
|
|
36
53
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
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));
|
|
54
|
+
module.exports = __toCommonJS(build_presets_exports);
|
|
57
55
|
const targets = [
|
|
58
56
|
"es5",
|
|
59
57
|
"es6",
|
|
@@ -71,7 +69,7 @@ const basePresetConfig = {
|
|
|
71
69
|
format: "esm",
|
|
72
70
|
target: "es6",
|
|
73
71
|
buildType: "bundle",
|
|
74
|
-
|
|
72
|
+
outDir: "./dist",
|
|
75
73
|
dts: { distPath: "./types" }
|
|
76
74
|
};
|
|
77
75
|
const npmLibraryPresetConfig = [
|
|
@@ -79,14 +77,14 @@ const npmLibraryPresetConfig = [
|
|
|
79
77
|
format: "cjs",
|
|
80
78
|
target: "es6",
|
|
81
79
|
buildType: "bundle",
|
|
82
|
-
|
|
80
|
+
outDir: "./dist/lib",
|
|
83
81
|
dts: false
|
|
84
82
|
},
|
|
85
83
|
{
|
|
86
84
|
format: "esm",
|
|
87
85
|
target: "es6",
|
|
88
86
|
buildType: "bundle",
|
|
89
|
-
|
|
87
|
+
outDir: "./dist/es",
|
|
90
88
|
dts: false
|
|
91
89
|
},
|
|
92
90
|
{
|
|
@@ -99,21 +97,21 @@ const npmLibraryWithUmdPresetConfig = [
|
|
|
99
97
|
format: "cjs",
|
|
100
98
|
target: "es6",
|
|
101
99
|
buildType: "bundle",
|
|
102
|
-
|
|
100
|
+
outDir: "./dist/lib",
|
|
103
101
|
dts: false
|
|
104
102
|
},
|
|
105
103
|
{
|
|
106
104
|
format: "esm",
|
|
107
105
|
target: "es6",
|
|
108
106
|
buildType: "bundle",
|
|
109
|
-
|
|
107
|
+
outDir: "./dist/es",
|
|
110
108
|
dts: false
|
|
111
109
|
},
|
|
112
110
|
{
|
|
113
111
|
format: "umd",
|
|
114
112
|
target: "es6",
|
|
115
113
|
buildType: "bundle",
|
|
116
|
-
|
|
114
|
+
outDir: "./dist/umd",
|
|
117
115
|
dts: false
|
|
118
116
|
},
|
|
119
117
|
{
|
|
@@ -126,19 +124,19 @@ const npmComponentPresetConfig = [
|
|
|
126
124
|
format: "cjs",
|
|
127
125
|
target: "es6",
|
|
128
126
|
buildType: "bundleless",
|
|
129
|
-
|
|
127
|
+
outDir: "./dist/lib",
|
|
130
128
|
dts: false
|
|
131
129
|
},
|
|
132
130
|
{
|
|
133
131
|
format: "esm",
|
|
134
132
|
target: "es6",
|
|
135
133
|
buildType: "bundleless",
|
|
136
|
-
|
|
134
|
+
outDir: "./dist/es",
|
|
137
135
|
dts: false
|
|
138
136
|
},
|
|
139
137
|
{
|
|
140
138
|
buildType: "bundleless",
|
|
141
|
-
|
|
139
|
+
outDir: "./dist/types",
|
|
142
140
|
dts: { only: true }
|
|
143
141
|
}
|
|
144
142
|
];
|
|
@@ -147,21 +145,21 @@ const npmComponentWithUmdPresetConfig = [
|
|
|
147
145
|
format: "cjs",
|
|
148
146
|
target: "es6",
|
|
149
147
|
buildType: "bundleless",
|
|
150
|
-
|
|
148
|
+
outDir: "./dist/lib",
|
|
151
149
|
dts: false
|
|
152
150
|
},
|
|
153
151
|
{
|
|
154
152
|
format: "esm",
|
|
155
153
|
target: "es6",
|
|
156
154
|
buildType: "bundleless",
|
|
157
|
-
|
|
155
|
+
outDir: "./dist/es",
|
|
158
156
|
dts: false
|
|
159
157
|
},
|
|
160
158
|
{
|
|
161
159
|
format: "umd",
|
|
162
160
|
target: "es6",
|
|
163
161
|
buildType: "bundle",
|
|
164
|
-
|
|
162
|
+
outDir: "./dist/umd",
|
|
165
163
|
dts: false
|
|
166
164
|
},
|
|
167
165
|
{
|
|
@@ -215,5 +213,24 @@ const BuildInPreset = {
|
|
|
215
213
|
NPM_COMPONENT: npmComponentPresetConfig,
|
|
216
214
|
NPM_COMPONENT_WITH_UMD: npmComponentWithUmdPresetConfig
|
|
217
215
|
};
|
|
216
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
217
|
+
0 && (module.exports = {
|
|
218
|
+
BuildInPreset,
|
|
219
|
+
basePresetConfig,
|
|
220
|
+
componentPreset,
|
|
221
|
+
componentPresetWithTarget,
|
|
222
|
+
componentUmdPreset,
|
|
223
|
+
componentUmdPresetWithTarget,
|
|
224
|
+
libraryPreset,
|
|
225
|
+
libraryPresetWithTarget,
|
|
226
|
+
libraryUmdPreset,
|
|
227
|
+
libraryUmdPresetWithTarget,
|
|
228
|
+
npmComponentPresetConfig,
|
|
229
|
+
npmComponentWithUmdPresetConfig,
|
|
230
|
+
npmLibraryPresetConfig,
|
|
231
|
+
npmLibraryWithUmdPresetConfig,
|
|
232
|
+
presetList,
|
|
233
|
+
targets
|
|
234
|
+
});
|
|
218
235
|
|
|
219
236
|
//# sourceMappingURL=build-presets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,EACP;AAAA,EACA;AAAA,IACE,QAAQ;AAA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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"]}
|
package/dist/constants/build.js
CHANGED
|
@@ -15,14 +15,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var build_exports = {};
|
|
19
|
+
__export(build_exports, {
|
|
20
20
|
buildFailText: () => buildFailText,
|
|
21
21
|
buildSuccessText: () => buildSuccessText,
|
|
22
22
|
buildingText: () => buildingText,
|
|
23
23
|
defaultBuildConfig: () => defaultBuildConfig
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(build_exports);
|
|
26
26
|
var import_utils = require("@modern-js/utils");
|
|
27
27
|
const buildingText = import_utils.chalk.blue("Building...");
|
|
28
28
|
const buildSuccessText = import_utils.chalk.green("Build succeed");
|
|
@@ -33,7 +33,7 @@ const defaultBuildConfig = Object.freeze({
|
|
|
33
33
|
target: "esnext",
|
|
34
34
|
sourceMap: false,
|
|
35
35
|
copy: {},
|
|
36
|
-
|
|
36
|
+
outDir: "./dist",
|
|
37
37
|
dts: Object.freeze({
|
|
38
38
|
only: false,
|
|
39
39
|
distPath: "./",
|
|
@@ -67,5 +67,12 @@ const defaultBuildConfig = Object.freeze({
|
|
|
67
67
|
modules: {}
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
buildFailText,
|
|
73
|
+
buildSuccessText,
|
|
74
|
+
buildingText,
|
|
75
|
+
defaultBuildConfig
|
|
76
|
+
});
|
|
70
77
|
|
|
71
78
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"file":null,"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"]}
|
package/dist/constants/colors.js
CHANGED
|
@@ -15,15 +15,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var colors_exports = {};
|
|
19
|
+
__export(colors_exports, {
|
|
20
20
|
blue: () => blue,
|
|
21
21
|
gray: () => gray,
|
|
22
22
|
purple: () => purple
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(colors_exports);
|
|
25
25
|
const purple = [115, 22, 192];
|
|
26
26
|
const blue = [82, 221, 252];
|
|
27
27
|
const gray = [36, 2, 45];
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
blue,
|
|
31
|
+
gray,
|
|
32
|
+
purple
|
|
33
|
+
});
|
|
28
34
|
|
|
29
35
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,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"]}
|
package/dist/constants/dts.js
CHANGED
|
@@ -15,14 +15,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var dts_exports = {};
|
|
19
|
+
__export(dts_exports, {
|
|
20
20
|
defaultTransformedFunctions: () => defaultTransformedFunctions,
|
|
21
21
|
defaultTsConfigPath: () => defaultTsConfigPath,
|
|
22
22
|
dtsTempDirectory: () => dtsTempDirectory,
|
|
23
23
|
watchDoneText: () => watchDoneText
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(dts_exports);
|
|
26
26
|
const defaultTransformedFunctions = [
|
|
27
27
|
"require",
|
|
28
28
|
"require.resolve",
|
|
@@ -41,5 +41,12 @@ const defaultTransformedFunctions = [
|
|
|
41
41
|
const defaultTsConfigPath = "./tsconfig.json";
|
|
42
42
|
const watchDoneText = "Watching for file changes";
|
|
43
43
|
const dtsTempDirectory = "node_modules/.dts-temp";
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
defaultTransformedFunctions,
|
|
47
|
+
defaultTsConfigPath,
|
|
48
|
+
dtsTempDirectory,
|
|
49
|
+
watchDoneText
|
|
50
|
+
});
|
|
44
51
|
|
|
45
52
|
//# sourceMappingURL=dts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,8BAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AACF;AAEO,MAAM,sBAAsB;AAC5B,MAAM,gBAAgB;AACtB,MAAM,mBAAmB;","names":[],"sources":["../../src/constants/dts.ts"],"sourcesContent":["export const defaultTransformedFunctions = [\n 'require',\n 'require.resolve',\n 'System.import',\n\n // Jest methods\n 'jest.genMockFromModule',\n 'jest.mock',\n 'jest.unmock',\n 'jest.doMock',\n 'jest.dontMock',\n 'jest.setMock',\n 'jest.requireActual',\n 'jest.requireMock',\n\n // Older Jest methods\n 'require.requireActual',\n 'require.requireMock',\n];\n\nexport const defaultTsConfigPath = './tsconfig.json';\nexport const watchDoneText = 'Watching for file changes';\nexport const dtsTempDirectory = 'node_modules/.dts-temp';\n"]}
|