generator-ngx-rocket
generator-ngx-rocket copied to clipboard
Add ngx-scripts support for Electron
Related: https://github.com/ngx-rocket/generator-ngx-rocket/issues/418
Current Electron build is far from perfect:
- it requires separate command to build / run / package app
- running app in serve mode is tedious: 2 separate commands to run in parallel + 1 to run the app
- packaged apps includes a not of unwanted files, bloating the resulting package
Some of these issues are related to the usage of electron-packager
and could be resolved by changing to electron-builder
with appropriate configuration as in #418 (the bloating), but the others would be simpler to tacker with a specific support for Electron in ngx-scripts, like how it's done for Cordova support.
Basically, it would be nice to mimic the Cordova workflow with something like 3 base scripts:
electron:run
, electron:build
and electron:clean
with additional params to enable live-reload (--serve
), skip rebuild (--fast
) or target a specific platform (windows|mac|linux
) for the build. The plumbing would then be done under the hood 😉