@gluedigital/universal-plugin-electron
v2.0.0
Published
A helper to add Electron support to Universal apps
Downloads
1
Keywords
Readme
universal-plugin-electron
A plugin to package Universal-Scripts apps as Electron redistributables.
Usage
You need to configure your project for Electron first. This usually involve some of the following steps:
- Adding a index generation step to the build process
- Disabling SSR
- Generating an Electron build for the main thread
Once you're done, this plugin will help you package your app for the different platforms.
To install it, start with:
npm install --save-dev @gluedigital/universal-plugin-electron
Then add this line to your package.json
in the scripts
section:
"package": "universal-plugin-electron",
Finally, to generate a build just run:
npm run package
A redistributable installer for your current platform will be generated at out/installers/
.
Config
If you want to pass some settings to the different packagers, just add a electronOptions
key to your package.json
, with an object with any of these keys:
packager
with options forelectron-packager
win
with options related to InnoSetup`osx
with options forelectron-installer-dmg
deb
with options forelectron-installer-debian
Why to use this?
This package doesn't do anything big, but helps you keep the Electron bundler dependencies managed, so you only need to care about a single package.