feat: electron desktop app without express server (#1136)
* feat: add electron app
* refactor: using different approach
* chore: update commit hash to 02621e3545
* fix: working dev but prod showing not found and lint fix
* fix: add icon
* fix: resolve server file load issue
* fix: eslint and prettier wip
* fix: only load server build once
* fix: forward request for other ports
* fix: use cloudflare {} to avoid crash
* fix: no need for appLogger
* fix: forward cookie
* fix: update script and update preload loading path
* chore: minor update for appId
* fix: store and load all cookies
* refactor: split main/index.ts
* refactor: group electron main files into two folders
* fix: update electron build configs
* fix: update auto update feat
* fix: vite-plugin-node-polyfills need to be in dependencies for dmg version to work
* ci: trigger build for electron branch
* ci: mark draft if it's from branch commit
* ci: add icons for windows and linux
* fix: update icons for windows
* fix: add author in package.json
* ci: use softprops/action-gh-release@v2
* fix: use path to join
* refactor: refactor path logic for working in both mac and windows
* fix: still need vite-plugin-node-polyfills dependencies
* fix: update vite-electron.config.ts
* ci: sign mac app
* refactor: assets folder
* ci: notarization
* ci: add NODE_OPTIONS
* ci: window only nsis dist
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
38
package.json
38
package.json
@@ -6,6 +6,10 @@
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "0.0.7",
|
||||
"author": {
|
||||
"name": "bolt.diy team",
|
||||
"email": "maintainers@bolt.diy"
|
||||
},
|
||||
"scripts": {
|
||||
"deploy": "npm run build && wrangler pages deploy",
|
||||
"build": "remix vite:build",
|
||||
@@ -25,7 +29,20 @@
|
||||
"typegen": "wrangler types",
|
||||
"preview": "pnpm run build && pnpm run start",
|
||||
"prepare": "husky",
|
||||
"clean": "node scripts/clean.js"
|
||||
"clean": "node scripts/clean.js",
|
||||
"electron:dev": "pnpm electron:dev:main",
|
||||
"electron:dev:renderer": "cross-env NODE_ENV=development pnpm exec electron electron/dev-server.mjs",
|
||||
"electron:dev:main": "cross-env NODE_ENV=development pnpm run electron:build:deps && electron build/electron/main/index.mjs",
|
||||
"electron:build:start": "electron-builder start",
|
||||
"electron:build:deps": "concurrently \"pnpm electron:build:main\" \"pnpm electron:build:preload\" --kill-others-on-fail",
|
||||
"electron:build:main": "vite build --config ./electron/main/vite.config.ts",
|
||||
"electron:build:preload": "vite build --config ./electron/preload/vite.config.ts",
|
||||
"electron:build:renderer": "remix vite:build --config vite-electron.config.js",
|
||||
"electron:build:unpack": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --dir",
|
||||
"electron:build:mac": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --mac",
|
||||
"electron:build:win": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --win",
|
||||
"electron:build:linux": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --linux",
|
||||
"electron:build:dist": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --mwl"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.18.0"
|
||||
@@ -94,6 +111,9 @@
|
||||
"date-fns": "^3.6.0",
|
||||
"diff": "^5.2.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"electron-log": "^5.2.3",
|
||||
"electron-store": "^10.0.0",
|
||||
"electron-updater": "^6.3.9",
|
||||
"file-saver": "^2.0.5",
|
||||
"framer-motion": "^11.12.0",
|
||||
"ignore": "^6.0.2",
|
||||
@@ -104,6 +124,7 @@
|
||||
"js-cookie": "^3.0.5",
|
||||
"jspdf": "^2.5.2",
|
||||
"jszip": "^3.10.1",
|
||||
"mime": "^4.0.4",
|
||||
"nanostores": "^0.10.3",
|
||||
"ollama-ai-provider": "^0.15.2",
|
||||
"path-browserify": "^1.0.1",
|
||||
@@ -127,23 +148,32 @@
|
||||
"shiki": "^1.24.0",
|
||||
"tailwind-merge": "^2.2.1",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"zod": "^3.24.1",
|
||||
"zustand": "^5.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitz/eslint-plugin": "0.1.0",
|
||||
"@cloudflare/workers-types": "^4.20241127.0",
|
||||
"@electron/notarize": "^2.5.0",
|
||||
"@iconify-json/ph": "^1.2.1",
|
||||
"@iconify/types": "^2.0.0",
|
||||
"@remix-run/dev": "^2.15.2",
|
||||
"@remix-run/serve": "^2.15.2",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
"@types/diff": "^5.2.3",
|
||||
"@types/dom-speech-recognition": "^0.0.4",
|
||||
"@types/electron": "^1.6.10",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"concurrently": "^8.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"electron": "^33.2.0",
|
||||
"electron-builder": "^25.1.8",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"husky": "9.1.7",
|
||||
@@ -152,17 +182,17 @@
|
||||
"node-fetch": "^3.3.2",
|
||||
"pnpm": "^9.14.4",
|
||||
"prettier": "^3.4.1",
|
||||
"rimraf": "^4.4.1",
|
||||
"sass-embedded": "^1.81.0",
|
||||
"typescript": "^5.7.2",
|
||||
"unified": "^11.0.5",
|
||||
"unocss": "^0.61.9",
|
||||
"vite": "^5.4.11",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vite-plugin-copy": "^0.1.6",
|
||||
"vite-plugin-optimize-css-modules": "^1.1.0",
|
||||
"vite-tsconfig-paths": "^4.3.2",
|
||||
"vitest": "^2.1.7",
|
||||
"wrangler": "^3.91.0",
|
||||
"zod": "^3.24.1"
|
||||
"wrangler": "^3.91.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"@typescript-eslint/utils": "^8.0.0-alpha.30"
|
||||
|
||||
Reference in New Issue
Block a user