- react react-router4 redux react-redux
$ yarn init -y
$ yarn add webpack webpack-dev-server --dev
$ yarn add babel-core babel-loader babel-preset-es2015 babel-preset-stage-0 babel-preset-react css-loader style-loader less less-loader html-webpack-plugin --dev
$ yarn add react redux react-redux react-router-dom react-dom
$ yarn add es6-promise whatwg-fetch --dev
$ yarn add express
$ yarn add swipe-js-iso react-swipe
"start","webpack-dev-server --port 5000 --open --progress --colors",
"build","webpack -p"
-
components 组件 木偶组件
-
containers 页面组件,或者自己的subpage目录下
- Home
- subpage 智能组件
- index.js
- Home
-
index.js 用来控制显示哪一个页面
-
store onlyOne
-
actions 用户发布动作
-
reducers 定义规则的
-
action-types action的名字
- 抽取css的以link标签引入
- 添加前缀
- 抽离第三方库