feat: 完成 Web2App 核心功能实现

- Electron 主进程:窗口管理、IPC、项目读写、打包引擎
- Vue 3 前端:4 个视图页面、3 个组件、Pinia 状态管理
- 生成应用模板:Express 后端 + Electron 窗口
- 支持资源导入、应用配置、跨平台打包
This commit is contained in:
gmh01
2026-07-23 18:25:35 +08:00
parent b67e27beb1
commit 2f3ec636e0
26 changed files with 8455 additions and 0 deletions

64
package.json Normal file
View File

@@ -0,0 +1,64 @@
{
"name": "web2app",
"version": "1.0.0",
"description": "将网站转化为独立运行的桌面应用",
"main": "electron/main.js",
"scripts": {
"dev": "vite",
"build": "vite build",
"electron:dev": "concurrently \"vite\" \"wait-on http://localhost:5173 && electron .\"",
"electron:build": "vite build && electron-builder --config",
"preview": "vite preview"
},
"build": {
"appId": "com.web2app.app",
"productName": "Web2App",
"directories": {
"output": "release"
},
"files": [
"electron/**/*",
"dist/**/*",
"template/**/*",
"package.json"
],
"extraResources": [],
"win": {
"target": [
{
"target": "nsis",
"arch": ["x64"]
}
],
"icon": null
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"shortcutName": "Web2App"
},
"mac": {
"target": ["dmg"],
"icon": null
},
"linux": {
"target": ["AppImage"],
"icon": null
}
},
"dependencies": {
"pinia": "^2.1.0",
"vue": "^3.4.0",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.0",
"concurrently": "^8.2.0",
"electron": "^28.0.0",
"electron-builder": "^24.9.0",
"vite": "^5.4.0",
"wait-on": "^7.2.0"
}
}