browselectrify

1.0.2 • Public • Published

browselectrify

make a browserify bundle that also works in electron.

basically, this makes a browserify bundle that doesn't have any node globals set (process, Buffer, etc) or core modules, and then it concatenates that to a bundle that provides those, but turns off in electron.

This makes the electron bundle 106k longer, but it will work in the browser.

npm install browselectrify electro electron-prebuilt -g
browselectrify index.js > bundle.js
electro index.js # run electron directly, loading with sync require's
electro bundle.js # run electron on bundle, this will load faster!

electro is a boilerplate killing wrapper around electron. if you just want to run a js file inside an electron instance, electro does that.

License

MIT

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i browselectrify

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • nopersonsmodules