项目作者: qld-cf

项目描述 :
基于create-react-app的electron模板
高级语言: JavaScript
项目地址: git://github.com/qld-cf/electron-common-react-tpl.git
创建时间: 2020-09-20T04:04:43Z
项目社区:https://github.com/qld-cf/electron-common-react-tpl

开源协议:

下载


create-react-app + electron

  • react 16.12
  • electron 9.1.0

运行和打包

  1. $ npm i
  2. $ npm start
  3. $ npm run build-react // web构建
  4. $ npm run build-electron // electron构建
  5. $ npm run pack // 当前系统类型打包
  6. $ npm run pack-all // 所有平台类型打包
  7. $ npm run lint // eslint检查

目录

  1. |————config --------------------- 启动和打包配置
  2. | |————webpack.config.js
  3. |————scripts -------------------- 启动和打包脚本
  4. | |————build-analyze.js --------- 文件分析
  5. | |————build.js ----------------- 打包
  6. | |————start.js ----------------- 运行
  7. | |————test.js ------------------ 测试
  8. |————electron ------------------- 主进程
  9. |————eslintRule ----------------- eslint规则
  10. |————src ------------------------ 渲染进程
  11. | |————api --------------------- 业务逻辑层
  12. | |————assets ------------------ 全局公用文件
  13. | | |————css ------------------- css
  14. | | |————images ---------------- 图片
  15. | | |————iconfont -------------- 字体等
  16. | |————common ------------------ 全局通用常量
  17. | |————components -------------- 通用组件
  18. | | |————common ---------------- 子组件封装
  19. | | | |————myList.tsx
  20. | | | |————myForm.tsx
  21. | | |————layout ---------------- 布局
  22. | | | |————header.tsx
  23. | |————views ------------------- 业务组件
  24. | | |————settlement ------------- 业务模块
  25. | | | |————Settlement.tsx
  26. | | |————index.tsx -------------- 入口
  27. | |————config ------------------- 全局配置
  28. | | |————routerConfig.tsx ------ 路由配置
  29. | |————redux -------------------- redux
  30. | | |————rootReducer.ts -------- reducer集合
  31. | | |————user.redux.ts --------- state | action | reducer集成 | 按模块划分不同文件
  32. | |————typings ------------------ 接口集合
  33. | |————utils -------------------- 通用工具类
  34. |————.eslintrc.js --------------- eslint入口
  35. |————.prettierrc.js ------------- prettier
  36. |————README.MD ------------------ 项目描述文件
  37. |————SETTINGS.MD ---------------- 运行配置介绍