electron + react-redux-saga basic project configuration

electron-react-base


Based electron+ react+ redux+ sagafoundation 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 imgthe directory, when the need to package please imgcopy the images directory to appthe imgdirectory

Project packaged into exe:

If you have pictures or other files, copied to the appdirectory.

npm run build //默认打包成exe,别的系统打包需要另行配置

or

npm run webpack-main
npm run webpack-renderer
npm run electron-builder

Guess you like

Origin blog.51cto.com/wuzishu/2415839