parcel-plugin-electron-process

1.0.0Β β€’Β PublicΒ β€’Β Published

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 or 0)
  • By default, the plugin is only active when target=electron and watch=true

Readme

Keywords

Package Sidebar

Install

npm i parcel-plugin-electron-process

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.95 kB

Total Files

6

Last publish

Collaborators

  • bengreenier