Electron + webpack + Babel + React + CSS Modules + cssnext
REQUIRED: Node.js >= v6 + Yarn
git clone https://github.com/your-name/your-project.git
cd your-project
git remote add upstream https://github.com/rot1024/electron-webpack-react-boilerplate.git
git fetch upstream
git merge upstream/master
yarn
git fetch upstream
git merge upstream/master
yarn
yarn start # start dev server and open app
yarn run lint # lint
yarn test # test
yarn run test:coverage # test with coverage
yarn run test:watch # watch tests
yarn run test:e2e # e2e test ***
yarn run clean # delete build directory
yarn run build # build for production
yarn run start:prod # start app in production mode ***
yarn run package # package for current OS
yarn run package:all # package for all OS
# ***: you have to exec 'yarn run build' before
You can put any static files on resources
directory, and load their resources as bellow:
<img src="resources/image.png" />
If you want to load any files in renderer, use webpack loader.
- Upgrade electron:
yarn upgrade-interactive
- Rewrite
"Electron x.x"
and"node": "x.x"
on browserslist inpackage.json
and.babelrc
into latest electron and node versions - Done!
This operation is going to be unnecessary if babel-preset-env supports to read browserslist config.