Skip to content

fix: 兼容 Windows prepare 脚本 - #2271

Open
bingame wants to merge 1 commit into
jackwener:mainfrom
bingame:codex/windows-prepare-script
Open

fix: 兼容 Windows prepare 脚本#2271
bingame wants to merge 1 commit into
jackwener:mainfrom
bingame:codex/windows-prepare-script

Conversation

@bingame

@bingame bingame commented Aug 9, 2026

Copy link
Copy Markdown

说明

现有 prepare 使用 POSIX shell 条件表达式,在 Windows npm 环境中无法执行。本 PR 将其替换为跨平台 Node.js 入口:

  • 源码目录存在时,通过当前 npm 执行入口运行 npm run build
  • 发布包或其他不包含 src 的目录中直接成功退出,保持原有跳过语义。
  • 正确透传构建失败和进程启动错误。

Related issue: 无

变更类型

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

检查清单

  • 已运行本 PR 相关检查
  • 无需更新测试或文档
  • 已提供验证输出

验证输出

  • Windows 源码仓库执行 node scripts/prepare.cjs:构建成功,生成 1331 条 manifest 记录
  • 在不包含 src 的目录执行同一脚本:退出码 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant