Files
cc-switch/package.json
farion1231 35cb750d19 修复 Electron 应用窗口不显示的问题
- 修正 Electron 依赖版本为 28.0.0(解决安装问题)
- 更新 package.json 中的启动脚本,改进并发命令执行
- 修正主进程入口文件路径配置
- 调整 TypeScript 编译配置的根目录设置
- 添加 Windows 开发环境启动脚本 start-dev.bat
- 更新 .gitignore 排除编译产物和锁文件

问题原因:pnpm 默认阻止了 Electron 安装脚本执行,导致应用无法正常启动
2025-08-05 09:51:21 +08:00

54 lines
1.4 KiB
JSON

{
"name": "cc-switch",
"version": "1.0.0",
"description": "Claude Code 供应商切换工具",
"main": "dist/main/index.js",
"scripts": {
"dev": "concurrently -k \"npm:dev:renderer\" \"npm:dev:electron:watch\"",
"dev:electron": "tsc -p tsconfig.main.json && electron .",
"dev:electron:watch": "tsc -p tsconfig.main.json && concurrently -k \"tsc -w -p tsconfig.main.json\" \"npm:electron\"",
"electron": "electron .",
"dev:renderer": "vite",
"build": "npm run build:renderer && npm run build:main",
"build:main": "tsc -p tsconfig.main.json",
"build:renderer": "vite build",
"start": "electron .",
"dist": "electron-builder"
},
"keywords": [],
"author": "",
"license": "MIT",
"devDependencies": {
"@types/node": "^20.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@vitejs/plugin-react": "^4.2.0",
"concurrently": "^8.2.0",
"electron": "28.0.0",
"electron-builder": "^24.0.0",
"typescript": "^5.3.0",
"vite": "^5.0.0"
},
"dependencies": {
"axios": "^1.6.0",
"electron-store": "^8.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"build": {
"appId": "com.ccswitch.app",
"productName": "CC Switch",
"directories": {
"output": "release"
},
"mac": {
"category": "public.app-category.developer-tools"
},
"win": {
"target": "nsis"
},
"linux": {
"target": "AppImage"
}
}
}