mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-22 19:39:31 +08:00
- 新建 desktop/ 作为独立 Electron 项目,包含独立 package.json 和 pnpm-lock.yaml - 迁移 electron/main.cjs、electron/preload.cjs、构建配置及打包脚本 - frontend/ 仅保留 Web 前端代码,移除所有 Electron 相关依赖和脚本 - 更新 CI workflow 和 .gitignore 路径指向 desktop/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
449 B
JavaScript
16 lines
449 B
JavaScript
"use strict"
|
|
|
|
/** CI / 无桌面需求时设为 1,可跳过 Chromium 下载 */
|
|
if (process.env.ELECTRON_SKIP_BINARY_DOWNLOAD === "1") {
|
|
process.exit(0)
|
|
}
|
|
|
|
const { execSync } = require("child_process")
|
|
const fs = require("fs")
|
|
const path = require("path")
|
|
|
|
const installScript = path.join(__dirname, "..", "node_modules", "electron", "install.js")
|
|
if (fs.existsSync(installScript)) {
|
|
execSync(`node "${installScript}"`, { stdio: "inherit" })
|
|
}
|