How can you pack up your Electron proyect in windows?

FranDev - Aug 23 - - Dev Community

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

. .
Terabox Video Player