DEV Community

Cover image for How can you pack up your Electron proyect in windows?
FranDev
FranDev

Posted on

How can you pack up your Electron proyect in windows?

To pack up your Electron proyect in windows, you will need to install a dependency in a electron proyect still created.

This dependency is called electron-builder. The installation command it is the following:

npm install --save-dev electron-builder
Enter fullscreen mode Exit fullscreen mode

Secondly, it is necessary make a build of our proyect so you need to execute this command:

npm run build:win
Enter fullscreen mode Exit fullscreen mode

Thirdly, if you want to pack up your proyect, you will put in file package.json, in the section scripts this script:

"electron-pack": "npm run build && electron-builder"
Enter fullscreen mode Exit fullscreen mode

image

Finnaly, for pack up your proyect, you will execute this command:

npm run electron-pack
Enter fullscreen mode Exit fullscreen mode

The installer it will be installed in the dist directory and the name of your aplication installer it will be something like this name [your_electron_proyect_name]-[version]-setup.exe.

For install your app in your device you only need to click in the file named before and it will be installed in your Desktop directory.

image

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay