weapp-vite 4.0.2 → 4.0.3
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/dist/{chunk-X6MUD4OM.mjs → chunk-3UR4ALJA.mjs} +1416 -1414
- package/dist/{chunk-4RA3EKOJ.cjs → chunk-DG3U5YAM.cjs} +1509 -1507
- package/dist/cli.cjs +13 -13
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
package/dist/cli.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkDG3U5YAMcjs = require('./chunk-DG3U5YAM.cjs');
|
|
7
7
|
require('./chunk-T5OM6XSR.cjs');
|
|
8
8
|
require('./chunk-7K7GXEBV.cjs');
|
|
9
9
|
|
|
@@ -823,14 +823,14 @@ async function generate(options) {
|
|
|
823
823
|
for (const { code, fileName: fileName2 } of files) {
|
|
824
824
|
if (code !== void 0) {
|
|
825
825
|
await _fsextra2.default.outputFile(_pathe2.default.resolve(basepath, fileName2), code, "utf8");
|
|
826
|
-
|
|
826
|
+
_chunkDG3U5YAMcjs.logger_default.success(`${composePath(outDir, fileName2)} \u521B\u5EFA\u6210\u529F\uFF01`);
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
_chunkWAO6ZIROcjs.__name.call(void 0, generate, "generate");
|
|
831
831
|
|
|
832
832
|
// src/cli.ts
|
|
833
|
-
var import_reflect_metadata = _chunkWAO6ZIROcjs.__toESM.call(void 0,
|
|
833
|
+
var import_reflect_metadata = _chunkWAO6ZIROcjs.__toESM.call(void 0, _chunkDG3U5YAMcjs.require_Reflect.call(void 0, ), 1);
|
|
834
834
|
var cli = cac("weapp-vite");
|
|
835
835
|
function loadConfig() {
|
|
836
836
|
return _vite.loadConfigFromFile.call(void 0, {
|
|
@@ -852,9 +852,9 @@ function logBuildAppFinish(configService) {
|
|
|
852
852
|
]
|
|
853
853
|
}));
|
|
854
854
|
const devCommand = `${command} ${args.join(" ")}`;
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
855
|
+
_chunkDG3U5YAMcjs.logger_default.success("\u5E94\u7528\u6784\u5EFA\u5B8C\u6210\uFF01\u9884\u89C8\u65B9\u5F0F ( `2` \u79CD\u9009\u5176\u4E00\u5373\u53EF)\uFF1A");
|
|
856
|
+
_chunkDG3U5YAMcjs.logger_default.info(`\u6267\u884C \`${devCommand}\` \u53EF\u4EE5\u76F4\u63A5\u5728 \`\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\` \u91CC\u6253\u5F00\u5F53\u524D\u5E94\u7528`);
|
|
857
|
+
_chunkDG3U5YAMcjs.logger_default.info("\u6216\u624B\u52A8\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u5BFC\u5165\u6839\u76EE\u5F55(`project.config.json` \u6587\u4EF6\u6240\u5728\u7684\u76EE\u5F55)\uFF0C\u5373\u53EF\u9884\u89C8\u6548\u679C");
|
|
858
858
|
logBuildAppFinishOnlyShowOnce = true;
|
|
859
859
|
}
|
|
860
860
|
}
|
|
@@ -881,7 +881,7 @@ async function openIde() {
|
|
|
881
881
|
"-p"
|
|
882
882
|
]);
|
|
883
883
|
} catch (error) {
|
|
884
|
-
|
|
884
|
+
_chunkDG3U5YAMcjs.logger_default.error(error);
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
887
|
_chunkWAO6ZIROcjs.__name.call(void 0, openIde, "openIde");
|
|
@@ -892,7 +892,7 @@ cli.option("-c, --config <file>", `[string] use specified config file`).option("
|
|
|
892
892
|
}).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
|
|
893
893
|
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--skipNpm", `[boolean] if skip npm build`).option("-o, --open", `[boolean] open ide`).action(async (root, options) => {
|
|
894
894
|
filterDuplicateOptions(options);
|
|
895
|
-
const { buildService, configService } = await
|
|
895
|
+
const { buildService, configService } = await _chunkDG3U5YAMcjs.createCompilerContext.call(void 0, {
|
|
896
896
|
cwd: root,
|
|
897
897
|
mode: options.mode,
|
|
898
898
|
isDev: true
|
|
@@ -905,7 +905,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
|
905
905
|
});
|
|
906
906
|
cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'modules')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", `[boolean | "terser" | "esbuild"] enable/disable minification, or specify minifier to use (default: esbuild)`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--skipNpm", `[boolean] if skip npm build`).option("-o, --open", `[boolean] open ide`).action(async (root, options) => {
|
|
907
907
|
filterDuplicateOptions(options);
|
|
908
|
-
const { buildService, configService } = await
|
|
908
|
+
const { buildService, configService } = await _chunkDG3U5YAMcjs.createCompilerContext.call(void 0, {
|
|
909
909
|
cwd: root,
|
|
910
910
|
mode: options.mode
|
|
911
911
|
});
|
|
@@ -921,7 +921,7 @@ cli.command("init").action(async () => {
|
|
|
921
921
|
command: "weapp-vite"
|
|
922
922
|
});
|
|
923
923
|
} catch (error) {
|
|
924
|
-
|
|
924
|
+
_chunkDG3U5YAMcjs.logger_default.error(error);
|
|
925
925
|
}
|
|
926
926
|
});
|
|
927
927
|
cli.command("open").action(async () => {
|
|
@@ -934,7 +934,7 @@ cli.command("npm").alias("build:npm").alias("build-npm").action(async () => {
|
|
|
934
934
|
"-p"
|
|
935
935
|
]);
|
|
936
936
|
} catch (error) {
|
|
937
|
-
|
|
937
|
+
_chunkDG3U5YAMcjs.logger_default.error(error);
|
|
938
938
|
}
|
|
939
939
|
});
|
|
940
940
|
cli.command("gc [filepath]", "generate component").alias("g").alias("generate").option("-a, --app", "type app").option("-p, --page", "type app").option("-n, --name <name>", "filename").action(async (filepath, options) => {
|
|
@@ -949,7 +949,7 @@ cli.command("gc [filepath]", "generate component").alias("g").alias("generate").
|
|
|
949
949
|
fileName = "app";
|
|
950
950
|
}
|
|
951
951
|
if (filepath === void 0) {
|
|
952
|
-
|
|
952
|
+
_chunkDG3U5YAMcjs.logger_default.error("weapp-vite generate <outDir> \u547D\u4EE4\u5FC5\u987B\u4F20\u5165\u8DEF\u5F84\u53C2\u6570 outDir");
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
955
955
|
if (options.page) {
|
|
@@ -968,5 +968,5 @@ cli.command("create [outDir]", "create project").option("-t, --template <type>",
|
|
|
968
968
|
await _init.createProject.call(void 0, outDir, options.template);
|
|
969
969
|
});
|
|
970
970
|
cli.help();
|
|
971
|
-
cli.version(
|
|
971
|
+
cli.version(_chunkDG3U5YAMcjs.VERSION);
|
|
972
972
|
cli.parse();
|
package/dist/cli.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDG3U5YAMcjs = require('./chunk-DG3U5YAM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkT5OM6XSRcjs = require('./chunk-T5OM6XSR.cjs');
|
|
@@ -19,7 +19,7 @@ var _chunkWAO6ZIROcjs = require('./chunk-WAO6ZIRO.cjs');
|
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
_chunkWAO6ZIROcjs.init_cjs_shims.call(void 0, );
|
|
22
|
-
var import_reflect_metadata = _chunkWAO6ZIROcjs.__toESM.call(void 0,
|
|
22
|
+
var import_reflect_metadata = _chunkWAO6ZIROcjs.__toESM.call(void 0, _chunkDG3U5YAMcjs.require_Reflect.call(void 0, ), 1);
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -28,4 +28,4 @@ var import_reflect_metadata = _chunkWAO6ZIROcjs.__toESM.call(void 0, _chunk4RA3E
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
exports.createCompilerContext =
|
|
31
|
+
exports.createCompilerContext = _chunkDG3U5YAMcjs.createCompilerContext; exports.defineAppJson = _chunk7K7GXEBVcjs.defineAppJson; exports.defineComponentJson = _chunk7K7GXEBVcjs.defineComponentJson; exports.defineConfig = _chunkT5OM6XSRcjs.defineConfig; exports.definePageJson = _chunk7K7GXEBVcjs.definePageJson; exports.defineSitemapJson = _chunk7K7GXEBVcjs.defineSitemapJson; exports.defineThemeJson = _chunk7K7GXEBVcjs.defineThemeJson;
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.3",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -86,20 +86,20 @@
|
|
|
86
86
|
"comment-json": "^4.2.5",
|
|
87
87
|
"debug": "^4.4.0",
|
|
88
88
|
"esbuild": "^0.25.2",
|
|
89
|
-
"fdir": "^6.4.
|
|
89
|
+
"fdir": "^6.4.4",
|
|
90
90
|
"fs-extra": "^11.3.0",
|
|
91
91
|
"pathe": "^2.0.3",
|
|
92
92
|
"picomatch": "^4.0.2",
|
|
93
93
|
"postcss": "^8.5.3",
|
|
94
94
|
"tsup": "^8.4.0",
|
|
95
|
-
"vite": "^6.3.
|
|
95
|
+
"vite": "^6.3.2",
|
|
96
96
|
"vite-plugin-commonjs": "^0.10.4",
|
|
97
97
|
"vite-tsconfig-paths": "^5.1.4",
|
|
98
|
-
"@weapp-core/logger": "^1.0.3",
|
|
99
98
|
"@weapp-core/init": "^1.1.17",
|
|
99
|
+
"@weapp-core/logger": "^1.0.3",
|
|
100
100
|
"@weapp-core/schematics": "^1.0.12",
|
|
101
|
-
"@weapp-vite/volar": "^0.0.0",
|
|
102
101
|
"@weapp-core/shared": "^1.0.7",
|
|
102
|
+
"@weapp-vite/volar": "^0.0.0",
|
|
103
103
|
"weapp-ide-cli": "^2.0.10"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"esbuild-plugins-node-modules-polyfill": "^1.7.0",
|
|
115
115
|
"estree-walker": "^3.0.3",
|
|
116
116
|
"htmlparser2": "^10.0.0",
|
|
117
|
-
"inversify": "^7.5.
|
|
117
|
+
"inversify": "^7.5.1",
|
|
118
118
|
"local-pkg": "^1.1.1",
|
|
119
119
|
"lru-cache": "^10.4.3",
|
|
120
120
|
"magic-string": "^0.30.17",
|