electron-react-base
Based electron
+ react
+ redux
+ saga
foundation project configuration
GitHub: https://github.com/maichonglyd/electron-react-base
Project structure:
- ultimately packaged app directory
- Packaged when debugging build the project directory
- flow flow syntax definition directory
- img pictures directory
- scss interface style directory
- src directory interface code
- webpack webpack packaged configuration directory
src directory structure:
- components interface components directory
- Interface catalog pages
- redux data organization directory
- sagas catalog data request
- App.jsx routing configuration page
- main-dev.js project commissioning entrance
- Entrance after main.js project package
- renderer.jsx page startup file
Project commissioning:
npm init
npm run webpack-renderer-watch
npm run start-dev
If you need to use when debugging the picture, can be placed in
img
the directory, when the need to package pleaseimg
copy the images directory toapp
theimg
directory
Project packaged into exe:
If you have pictures or other files, copied to the
app
directory.npm run build //默认打包成exe,别的系统打包需要另行配置
or
npm run webpack-main npm run webpack-renderer npm run electron-builder