Asked 17 days ago
25 Nov 2017
Views 50
jaggy

jaggy posted

how to make .exe from electron js code ?

how to make .exe from electron js code ?
Mitul Dabhi

Mitul Dabhi
answered Dec 12 '17 20:17


# for use in npm scripts
npm install electron-packager --save-dev

# for use from cli
npm install electron-packager -g



electron-packager . example --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="Electron Tutorial App"
Edit Answer
Share
Rasi

Rasi
answered Dec 12 '17 20:17


npm install electron-builder --save-dev



npm install electron-builder-squirrel-windows


chnage package.json (i used for window build only )


"scripts": {
    "postinstall": "install-app-deps",
    "start": "npm install && electron ./app",
    "pack": "build --dir",
    "dist": "build"
  },
  "build": {
    "appId": "yourappid",
    "win": {
      "target": "squirrel",
     }
  }



npm run dist
Edit Answer
Share
Post Answer