feat(tools): build-game 构建流水线
版本校验 → 实体化 → 皮肤合成 → 构建 → build-info。任一校验不过 即中止且不触发构建。runBuild 为注入点, 除真构建外全流程可单测。 Cocos 可执行路径只从 COCOS_CREATOR 环境变量取, 缺失显式报错。 同时补入 check-skin.mjs 的 process.argv[1] 守卫,与仓库其余脚本一致。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ export function checkSkin(gameName, opts = {}) {
|
||||
}
|
||||
|
||||
// CLI 入口:有错误则退出码 1
|
||||
if (import.meta.url === pathToFileURL(process.argv[1]).href) {
|
||||
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
||||
const name = process.argv[2];
|
||||
if (!name) {
|
||||
console.error('用法: npm run check-skin <game>');
|
||||
|
||||
Reference in New Issue
Block a user