Skip to content
Yet another boilerplate for dva.
Branch: master
Clone or download
Latest commit 7b89ba2 Jan 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
boilerplate typo Jan 17, 2018
README.md

README.md

dva-boilerplate-electron

Boilerplate to kickstart creating an app with Electron and dva.

详见Electron 应用实战 (架构篇),解释为何这样组织。

Getting started

In your directory, run:

$ curl -fsSL https://github.com/sorrycc/dva-boilerplate-electron/archive/master.tar.gz | tar -xz --strip-components 2

You can also git clone or download this repo and get contents of the boilerplate folder.

Features

  • Two-Package.json Structure
  • Build src with webpack and babel, no grunt or gulp
  • Do communicate between main and renderer with electron.remote
  • Integrate two chrome extensions: redux devtool and react devtool
  • Livereload js and css
  • ...

Directory Structure

+ dist            // pack 完后的输出,.dmg, .exe, .zip, .app 等文件
+ build           // background.png, icon.icns, icon.ico
+ app             // 用于 pack 给用户的目录
  + dist          // src 目录打包完放这里
  + assets        // 字体、图片等资源文件
  + pages         // 存放页面
  - package.json  // 生产依赖,存 dependencies
+ src             // 源码
  + main          // main
  + renderer      // renderer
  + shared        // main 和 renderer 公用文件
- package.json    // 开发依赖,存 devDependencies

Screenshot

License

MIT

You can’t perform that action at this time.