excel-batch-editor/package.json
MikiVL cb2c186f7f
Some checks are pending
Build Windows Installer / build-windows (push) Waiting to run
添加 GitHub Actions Windows 构建流程
- 新增 .github/workflows/build-windows.yml,在 windows-latest runner 上构建 NSIS 安装包
- 修复 PYTHON_BIN 在 Windows 下需要 .exe 后缀
- 更新 extraResources 为目录式 glob,同时兼容 macOS (main) 和 Windows (main.exe)
- package.json 新增 win/nsis electron-builder 目标配置

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 23:02:53 +08:00

79 lines
2.4 KiB
JSON

{
"name": "excel-batch-editor",
"version": "1.0.0",
"main": "electron/main.js",
"scripts": {
"start": "electron .",
"dev": "concurrently \"npm run dev:renderer\" \"wait-on http://localhost:5173 && NODE_ENV=development electron .\"",
"dev:renderer": "vite --config renderer/vite.config.mjs --port 5173 --strictPort",
"build:python": "cd python && .venv/bin/pyinstaller --onefile --name main --distpath dist --workpath build --specpath . --hidden-import xl_parser --hidden-import generator --collect-all openpyxl --collect-all et_xmlfile --collect-all PIL main.py",
"build": "cd renderer && npx vite build --config vite.config.mjs && cd .. && electron-builder",
"dist": "npm run build:python && npm run build",
"test": "/Users/mikivl/workspace/excel-batch-editor/python/.venv/bin/pytest tests/python/ -v"
},
"build": {
"appId": "com.excelbatcheditor.app",
"productName": "Excel批量编辑器",
"files": [
"electron/**/*",
"renderer/dist/**/*",
"node_modules/**/*",
"package.json"
],
"asarUnpack": [
"node_modules/better-sqlite3/**/*"
],
"extraResources": [
{
"from": "python/dist/",
"to": "python",
"filter": ["main", "main.exe"]
}
],
"mac": {
"identity": null,
"hardenedRuntime": false,
"gatekeeperAssess": false,
"target": [
{ "target": "dmg", "arch": "arm64" }
],
"category": "public.app-category.productivity"
},
"dmg": {
"contents": [
{ "x": 130, "y": 150, "type": "file" },
{ "x": 410, "y": 150, "type": "link", "path": "/Applications" }
]
},
"win": {
"target": [
{ "target": "nsis", "arch": ["x64"] }
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true
}
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@tailwindcss/vite": "^4.0.0",
"@vitejs/plugin-react": "^4.2.0",
"concurrently": "^8.2.2",
"electron": "^28.0.0",
"electron-builder": "^24.9.1",
"electron-rebuild": "^3.2.9",
"tailwindcss": "^4.0.0",
"vite": "^5.0.0",
"wait-on": "^7.2.0"
},
"dependencies": {
"better-sqlite3": "^11.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.0"
}
}