ms-vite-plugin 0.0.15 → 0.0.17
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/bin/linux/ms-bundle-enc +0 -0
- package/bin/mac/ms-bundle-enc +0 -0
- package/bin/win/ms-bundle-enc.exe +0 -0
- package/dist/build.js +1 -1
- package/dist/cli.js +6 -6
- package/package.json +5 -5
package/bin/linux/ms-bundle-enc
CHANGED
|
Binary file
|
package/bin/mac/ms-bundle-enc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/build.js
CHANGED
|
@@ -85,7 +85,7 @@ const buildAll = async (isDev = true, workspacePath) => {
|
|
|
85
85
|
},
|
|
86
86
|
fileName: () => entry,
|
|
87
87
|
formats: ["iife"],
|
|
88
|
-
name: "
|
|
88
|
+
name: "KuaiJS", // IIFE 格式必需的全局变量名
|
|
89
89
|
},
|
|
90
90
|
outDir: "msbundle/scripts",
|
|
91
91
|
emptyOutDir: false, // 不要每次清空输出目录
|
package/dist/cli.js
CHANGED
|
@@ -39,11 +39,11 @@ const path = __importStar(require("path"));
|
|
|
39
39
|
const build_1 = require("./build");
|
|
40
40
|
const fsExtra = __importStar(require("fs-extra"));
|
|
41
41
|
/**
|
|
42
|
-
* 检查工作目录是否为有效的
|
|
42
|
+
* 检查工作目录是否为有效的 KuaiJS 项目
|
|
43
43
|
* @param workspacePath 工作目录路径
|
|
44
44
|
* @returns 是否为有效项目
|
|
45
45
|
*/
|
|
46
|
-
async function
|
|
46
|
+
async function isValidKuaiJSProject(workspacePath) {
|
|
47
47
|
try {
|
|
48
48
|
const packageJsonPath = path.join(workspacePath, "package.json");
|
|
49
49
|
const scriptsPath = path.join(workspacePath, "scripts");
|
|
@@ -70,8 +70,8 @@ async function buildCommand(options) {
|
|
|
70
70
|
: process.cwd();
|
|
71
71
|
const isDev = options.dev || false;
|
|
72
72
|
console.log(`🔍 检查项目目录: ${workspacePath}`);
|
|
73
|
-
if (!(await
|
|
74
|
-
console.error("❌ 错误: 当前目录不是有效的
|
|
73
|
+
if (!(await isValidKuaiJSProject(workspacePath))) {
|
|
74
|
+
console.error("❌ 错误: 当前目录不是有效的 快点JS 项目");
|
|
75
75
|
console.error("请确保目录包含以下文件:");
|
|
76
76
|
console.error(" - package.json");
|
|
77
77
|
console.error(" - scripts/ 目录");
|
|
@@ -89,11 +89,11 @@ async function buildCommand(options) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
// 配置 CLI 程序
|
|
92
|
-
commander_1.program.name("ms-cli").description("
|
|
92
|
+
commander_1.program.name("ms-cli").description("快点JS 构建工具").version("0.0.7");
|
|
93
93
|
// 构建命令
|
|
94
94
|
commander_1.program
|
|
95
95
|
.command("build")
|
|
96
|
-
.description("构建
|
|
96
|
+
.description("构建 快点JS 项目")
|
|
97
97
|
.option("-d, --dev", "开发模式构建 (包含 source map)")
|
|
98
98
|
.option("-p, --path <path>", "指定项目路径")
|
|
99
99
|
.action(buildCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ms-vite-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"7zip-min": "^2.1.0",
|
|
23
23
|
"@types/fs-extra": "^11.0.4",
|
|
24
24
|
"commander": "^14.0.0",
|
|
25
|
-
"fs-extra": "^11.3.
|
|
26
|
-
"vite": "^7.1.
|
|
25
|
+
"fs-extra": "^11.3.1",
|
|
26
|
+
"vite": "^7.1.4",
|
|
27
27
|
"vite-plugin-bundle-obfuscator": "^1.8.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^24.
|
|
31
|
-
"typescript": "~5.
|
|
30
|
+
"@types/node": "^24.3.1",
|
|
31
|
+
"typescript": "~5.9.2"
|
|
32
32
|
}
|
|
33
33
|
}
|