electronPackaging an electron app


Introduction

When ready for distribution, your electron app can be packaged into an executable file.

Electron applications can be packaged to run on Windows (32/64 bit), OSX (macOS) and Linux (x86/x86_64).

To package your code, use the npm package 'electron-packager\

https://github.com/electron-userland/electron-packager

Syntax

  • $ electron-packager
  • sourcedir
  • appname
  • --platform=platform
  • --arch=arch
  • [optional flags...]

Parameters

ParameterDetails
sourcedirThe directory of your electron application files
appnameThe name of your application
platformThe platform you want to compile your code for. Omitting this will compile for the host OS
archThe system architecture you want to compile your code for. Omitting this will compile for the host arch