@playcraft/cli 0.0.14 → 0.0.15
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/commands/build.js +2 -0
- package/dist/index.js +6 -3
- package/package.json +5 -4
package/dist/commands/build.js
CHANGED
|
@@ -460,6 +460,8 @@ export async function buildCommand(projectPath, options) {
|
|
|
460
460
|
outputDir: path.resolve(options.output || './dist'),
|
|
461
461
|
// 如果命令行指定了 --compress,则使用命令行参数;否则让平台配置生效
|
|
462
462
|
compressEngine: options.compress,
|
|
463
|
+
// 如果命令行指定了 --compress-config,则使用命令行参数;否则让平台配置生效
|
|
464
|
+
compressConfigJson: options.compressConfig,
|
|
463
465
|
analyze: options.analyze || false,
|
|
464
466
|
// Vite 构建选项
|
|
465
467
|
useVite: options.useVite !== false, // 默认使用 Vite
|
package/dist/index.js
CHANGED
|
@@ -131,7 +131,8 @@ program
|
|
|
131
131
|
.option('-s, --scenes <scenes>', '选择场景(逗号分隔),例如: MainMenu,Gameplay')
|
|
132
132
|
.option('--clean', '构建前清理旧的输出目录(默认启用)', true)
|
|
133
133
|
.option('--no-clean', '跳过清理旧的输出目录')
|
|
134
|
-
.option('--compress', '
|
|
134
|
+
.option('--compress', '压缩引擎代码(使用 LZ4)')
|
|
135
|
+
.option('--compress-config', '压缩 config.json(使用 LZ4,可减少 60-70% 体积)')
|
|
135
136
|
.option('--analyze', '生成打包分析报告')
|
|
136
137
|
.option('--replace-ammo', '检测到 Ammo 时自动替换为 p2 或 cannon')
|
|
137
138
|
.option('--ammo-engine <engine>', '指定替换物理引擎 (p2|cannon)')
|
|
@@ -178,7 +179,8 @@ program
|
|
|
178
179
|
.option('-f, --format <format>', '输出格式 (html|zip)', 'html')
|
|
179
180
|
.option('-o, --output <path>', '输出目录', './dist')
|
|
180
181
|
.option('-c, --config <file>', '配置文件路径')
|
|
181
|
-
.option('--compress', '
|
|
182
|
+
.option('--compress', '压缩引擎代码(使用 LZ4)')
|
|
183
|
+
.option('--compress-config', '压缩 config.json(使用 LZ4,可减少 60-70% 体积)')
|
|
182
184
|
.option('--replace-ammo', '检测到 Ammo 时自动替换为 p2 或 cannon')
|
|
183
185
|
.option('--ammo-engine <engine>', '指定替换物理引擎 (p2|cannon)')
|
|
184
186
|
.option('--mode <mode>', '构建模式 (full|base|playable)')
|
|
@@ -214,7 +216,8 @@ program
|
|
|
214
216
|
.option('-c, --config <file>', '配置文件路径')
|
|
215
217
|
.option('--clean', '构建前清理旧的输出目录(默认不清理,使用覆盖模式)')
|
|
216
218
|
.option('--no-clean', '使用覆盖模式(默认行为)')
|
|
217
|
-
.option('--compress', '
|
|
219
|
+
.option('--compress', '压缩引擎代码(使用 LZ4)')
|
|
220
|
+
.option('--compress-config', '压缩 config.json(使用 LZ4,可减少 60-70% 体积)')
|
|
218
221
|
.option('--analyze', '生成打包分析报告')
|
|
219
222
|
.option('--replace-ammo', '检测到 Ammo 时自动替换为 p2 或 cannon')
|
|
220
223
|
.option('--ammo-engine <engine>', '指定替换物理引擎 (p2|cannon)')
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcraft/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"playcraft": "./dist/index.js"
|
|
7
|
+
"playcraft": "./dist/index.js",
|
|
8
|
+
"playcraft-test": "./dist/index.js"
|
|
8
9
|
},
|
|
9
10
|
"files": [
|
|
10
11
|
"dist",
|
|
@@ -21,8 +22,8 @@
|
|
|
21
22
|
"release": "node scripts/release.js"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@playcraft/common": "^0.0.
|
|
25
|
-
"@playcraft/build": "^0.0.
|
|
25
|
+
"@playcraft/common": "^0.0.6",
|
|
26
|
+
"@playcraft/build": "^0.0.13",
|
|
26
27
|
"chokidar": "^4.0.3",
|
|
27
28
|
"commander": "^13.1.0",
|
|
28
29
|
"cors": "^2.8.6",
|