A opinionated project structure to get started developing with
electron-webpack,typescript&react.
This template comes packed:
- Use of
webpack-dev-serverfor development - HMR for both
rendererandmainprocesses - Use of
babel-preset-envthat is automatically configured based on yourelectronversion - Use of
electron-builderto package and build a distributable electron application electron-window-stateto manage window location- React Devtools integration with
electron-devtools-installer reduxas the ultimate source of truthelectron-reduxintegrating both main and renderer processesredux-persistwithelectron-storeto usetypesafe-actionsto avoid redux boilerplatematerial-uias the component library of choice as the material design spec is very malleablestorybookto develop components in isolation and much much more- Vscode debugging integration
- Github CI integration, which runs on push
Make sure to check out all the docs:
reactfor UIelectrondocs for all kinds of featureselectron-webpack's documentation for build pipeline
Simply clone down this repository, install dependencies, and get started on your application.
The use of the yarn package manager is strongly recommended, as opposed to using npm.
# copy template using git clone
git clone https://github.com/wallexd/reactrolysis.git
cd simple-electron-webpack-starterkit
rm -rf .git
# install dependencies
yarn# run application in development mode
yarn dev
# compile source code and create webpack output
yarn compile
# `yarn compile` & create build with electron-builder
yarn dist
# `yarn compile` & create unpacked build with electron-builder
yarn dist:dir@main: maps tosrc/modules- all the code runs in themainprocess. Entry for the main process issrc/main/index.ts@renderer: maps tosrc/renderer- all the code runs in therendererprocess. Entry for the main process issrc/renderer/index.tsx@common: maps tosrc/common- code that runs in bothrenderer&mainprocess likereduxstore@modules: maps tosrc/modules- to be used for modularly separating the features from app code. Features will contain reducers, action as well as associated components & tests
- Add
redux-observablesto handle side effects - Settings page
- with option to toggle theme handling between
auto&user - Cleaner way to handle storybook window creation
- with option to toggle theme handling between
- Add tests for reducers
- Add tests for epics

