Uses a minimal webpack config to bundle everything together, and includes just what you need to build your electron app. Tiny enough so that you keep a good overview of everything, simple enough for you to add what you need and still complete enough to start working on production projects.
Features:
react-router or redux. They
are dead-simple to integrate manually, this boilerplate does not make
assumptions about your tech stack.electron-builder included for bundling the app for Windows, Linux
and Mac. Easily adjustable configurations allows bundling installers or
zipped portable packages.prettier included for formatting.The CI pipeline is setup to automatically release new versions for
pushed tags. Make sure to bump the version in the package.json
file, and tag the commit with the new version (e.g. v1.0.0).
The following manual steps have to be completed initially to setup releases:
GH_SECRET that has repo accessappId and productName in electron-builder.jsonname, description, author, repository values in package.jsonresources/icon.png with a suitable logo image. Note that, for the Mac OS build to work, it must be at least 512x512Utilities like electron-builder and prettier are included for
convenience, but can easily be removed if you don't want them.
electron-builderbuild:unpacked, build:packed, build from
package.json:scripts.electron-builder.electron-builder.json.prettierprettier:check and prettier:write from
package.json:scriptsprettier.prettierrc.json.index.html, electron-main.js and
js/main.js (render logic) are placed in the app/
folder, which is loaded into the root of the
resources/app.asar archive once built into an
distributable package.path.join(app.getAppPath(), '/app/index.html')files-array in
electron-builder.json.webpack-renderer.config.ts
if you want to load those files in the render process, or
in webpack-electron.config.ts for the main process.resources/icon.pngyarn.lock, change yarn to npm run
in the scripts inside of package.json.fs-method do not return and block indefinitely.
app.allowRendererProcessReuse = false; in src/electron-main.ts:37