Builder, forge, packager... which do I use?


#1

There are three projects which, to me (a noob), seem to all be trying to do the same thing… Which one should I use?

I’m looking to:

  1. Distribute my apps through GitHub
  2. Make the apps auto-update
  3. Have a custom icon.

I recently converted my project to electron-forge, but then saw that electron-builder is what I use if I want auto-updating built in. Why are there so many projects?


#2

I know I’m late to the party here but purely to stop the spread of misinformation (someone linked me this today)

saw that electron-builder is what I use if I want auto-updating built in

This is flat out incorrect, Electron itself supports auto updating, what you use to build your application (forge, builder, packager) has absolutely no impact on this whatsoever. The resulting Electron app will always support the Squirrel updaters


#3

Now having played with everything for a while, I think this is the state of things:

  • electron-builder includes electron-updater which allows you to host your updates on GitHub (no need for an additional update server)
  • Electron itself supports auto-updating, but you have to bring your own update server.

This is correct, right?


#4

I found this answer by develar helpful:

electron-builder it is a tool to build your Electron application.

electron-forge it is a tool to build your Electron application PLUS boilerplate to create electron app.
electron-builder supports

  • code signing (CI support, auto discovery, multi-platform windows code sign)
  • publishing (including Bintray, S3 support coming soon)
  • easy way to configure files to pack (files, extraFiles and extraResources).
  • Numerous targets (including AppImage, Snap, pkg and so on).
  • Build all targets using one unified interface.
  • server-less auto update

How do they relate to electron-compile?

electron-builder and electron-forge are tools to build your electron app. electron-compile to create.

Does support Babel out-of-the-box?

For electron-builder it is out of scope, for electron-forge as well (so, electron-forge uses it under the hood).

Does they support minify, Tree-shaking, Dead-code-elimination? How about Node.js native dependencies?

Both tools supports native node deps management. electron-builder also supports Yarn. Maybe electron-builder does it better, but it depends. In any case you can use electron-rebuild (this tool is used under the hood by electron-forge).

Which one comes with less boilerplate?

electron-builder. Because electron-forge also helps you to create your app, not only to build. But electron-forge also doesn’t create tons of boilerplate code, as far I know.

In short: you don’t need to choose or only electron-forge, or only electron-builder. electron-builder doesn’t restrict you and you can use any framework and any packaging tool. You can use electron-builder to pack only in a distributable format.
electron-builder. Because electron-forge also helps you to create your app, not only to build. But electron-forge also doesn’t create tons of boilerplate code, as far I know.

In short: you don’t need to choose or only electron-forge, or only electron-builder. electron-builder doesn’t restrict you and you can use any framework and any packaging tool. You can use electron-builder to pack only in a distributable format.

(source)