A opinionated project structure to get started developing with
electron-webpack
,typescript
&react
.
This template comes packed:
webpack-dev-server
for developmentrenderer
and main
processesbabel-preset-env
that is automatically configured based on your electron
versionelectron-builder
to package and build a distributable electron applicationelectron-window-state
to manage window locationelectron-devtools-installer
redux
as the ultimate source of truthelectron-redux
integrating both main and renderer processesredux-persist
with electron-store
to usetypesafe-actions
to avoid redux boilerplatematerial-ui
as the component library of choice as the material design spec is very malleablestorybook
to develop components in isolation and much much moreMake sure to check out all the docs:
react
for UIelectron
docs for all kinds of featureselectron-webpack
's documentation for build pipelineSimply 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 to src/modules
- all the code runs in the main
process. Entry for the main process is src/main/index.ts
@renderer
: maps to src/renderer
- all the code runs in the renderer
process. Entry for the main process is src/renderer/index.tsx
@common
: maps to src/common
- code that runs in both renderer
& main
process like redux
store@modules
: maps to src/modules
- to be used for modularly separating the features from app code. Features will contain reducers, action as well as associated components & testsredux-observables
to handle side effectsauto
& user