GithubHelp home page GithubHelp logo

hhy5277 / electron-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from conardli/electron-react

0.0 1.0 0.0 222 KB

electron + react + react-router + mobx + webpack 搭建的脚手架工程(配实例DEMO)

JavaScript 79.56% HTML 17.06% Shell 0.22% CSS 3.16%

electron-react's Introduction

electron-react

electron + react + react-router + mobx + webpack 搭建的脚手架工程

像开发react web项目一样开发electron

image

项目路径与命名

main  //主进程
    menu  //菜单
render  //渲染进程
    component  //组件
    config  //配置
    public  //静态资源
    routes  //路由
    service  //服务
    utils  //工具类
    view  //页面
scripts  //打包脚本
main_process  //主进程打包目录
render_process   //渲染进程打包目录
dist    //客户端打包目录
resources  //图标资源

使用

本地调试

npm install
npm start

本地测试打包

npm run compile

打包客户端

npm run pack-win
npm run pack-mac

解决了什么问题

1.electron+react框架搭建

主进程代码使用babel编译,渲染进程使用webpack打包,快速开始开发。

2.调试

集成环境选择模块,简单分离开发,测试,线上环境。

image

3.程序保护

开机自启

托盘最小化

崩溃监控

4.升级

一行代码接入升级平台,实现客户端升级功能

5.打包构建

一个指令搞定打包

npm run pack-win
npm run pack-mac

6.其他特性

  • 立即可用的 React 插件 react-router,antd
  • electron-build轻松构建
  • webpack各种loader配置
  • 默认支持 stage-0 的 ES6

electron-react's People

Contributors

conardli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.