A rich Electron boilerplate that comes with support for TypeScript, jQuery, Sass and Webpack out of the box.
It's based on the boilerplate template typescript-webpack from Electron Forge.
The most important improvements I've made to the original template are:
- A more obvious folder structure to separate main, renderer and common environments.
- Fixed preload script not loading since it was not added to
plugin-webpack
config by default (#686). - Added jQuery as a dependency.
- Added Sass support.
- Stricter rules for TypeScript and Eslint.
- Default favicon.
- Tray icon and close to tray.
- Show main window when the page has been rendered, to prevent a visual flash (Electron docs).
- Added an exposed ContextBridge API example.
- Added some useful functions.
- Added a custom web component example.
git clone https://github.com/bvandevliet/electron-boilerplate.git
cd ./electron-boilerplate
yarn install
Read the Electron Forge documentation.