Skip to navigation
Example package.json to build linux, windows and mac desktop electron apps
07.08.19
1. windows and linux command: npm run dist comment: for windows and linux i use electron-builder and i can build a exe installer with linux after i installed the wine packages. 2. Mac command: npm run dist_mac comment: i could build it on linux as well but the app packages grow to big. so i used a hackingtosh with electron-packager and electron-installer-dmg package.json { "name": "grid", "description": "API interface, mostly to show grids", "version": "1.0.0", "main": "main.js", "scripts": { "start": "electron .", "pack": "electron-builder --dir", "dist": "electron-builder -wl", "dist_win": "electron-builder -w", "dist_lin": "electron-builder -l", "dist_mac": "electron-packager . --overwrite --platform=darwin && electron-installer-dmg --overwrite grid-darwin-x64/grid.app dist/grid", "dmg": "electron-installer-dmg grid-darwin-x64/grid.app dist/grid" }, "build": { "appId": "com.foo.grid", "win": { "target": "NSIS" } }, "author": { "name": "pd_web0@foo.com", "email": "pd_web0@foo.com" }, "homepage": "http://foo.com", "license": "GPL-3.0-or-later", "devDependencies": { "electron": "^6.0.1", "electron-builder": "^20.28.4", "electron-installer-dmg": "^3.0.0", "electron-packager": "^14.0.4" }, "dependencies": { "bootstrap": "^4.3.1", "browserify": "^16.2.3", "font-awesome": "^4.7.0", "free-jqgrid": "^4.15.5", "jquery": "^3.3.1", "jquery-ui-themes": "^1.12.0", "jqueryui": "^1.11.1", "popper.js": "^1.15.0", "pouchdb": "^7.1.1", "pouchdb-upsert": "^2.2.0" } }
https://github.com/electron/electron-packager
Reply
Anonymous
Information Epoch 1754591936
Live free or die.
Home
Notebook
Contact us