parcel-plugin-electron-process
v1.0.0
Published
Parcel development plugin that spawns and re-spawns an electron process. 🧬📦⚙
Downloads
3
Readme
parcel-plugin-electron-process
Parcel development plugin that spawns and re-spawns an electron process. 🧬📦⚙
I needed a plugin that would allow me to run electron automatically, when parcel built my code successfully (on buildEnd
) to imitate the behavior that occurs when building for the browser. However, better electron support hasn't landed yet - so I created this.
Usage
In any Parcel project:
# -D installs as a devDependency
npm install -D parcel-plugin-electron-process
# Use it
parcel --target electron path/to/file.ext
# Use it (forcably, with a non-electron target)
npx cross-env PARCEL_PLUGIN_ELECTRON_PROC=1 parcel --target node path/to/file.ext
# Disable it (with an electron target)
npx cross-env PARCEL_PLUGIN_ELECTRON_PROC=0 parcel --target electron path/to/file.ext
Notes
- After install, parcel will autodetect the plugin and begin using it.
PARCEL_PLUGIN_ELECTRON_PROC
overrides the default detection case (1
or0
)- By default, the plugin is only active when
target=electron
andwatch=true