electron-api-demos
electron-api-demos copied to clipboard
How to build for distribution?
- What operating system are you using? Mac OSX
- What version of Node.js is on your system? 13.8
In the package.json are various scripts like package and package:mac
What's the process for building the application for mac and windows?
No I don't have macosx
Hi @petervandeput, you can use electron-builder for distribution.
npm i -D electron-builder
After that, you can create scripts in package.json like this:
"script": {
"mac:build": "electron-builder --macos --dir",
"build:windows": "electron-builder --win --dir"
}
It will create a directory called dist with program-name.app and if you want to create *.dmg file, you must execute electron-builder --macos.
I hope that it can help you.