Skip to content

Commit 275501b

Browse files
author
Sven
committed
upgrade package & fix readme
1 parent 2c9966d commit 275501b

File tree

4 files changed

+373
-1213
lines changed

4 files changed

+373
-1213
lines changed

README.md

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,39 @@
44
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
55
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/YutHelloWorld/vortex-react/blob/master/LICENSE)
66

7-
Get start with [React](https://facebook.github.io/react/)/[Redux](http://redux.js.org/)/[React-Router v4](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom)/[Webpack v3](https://webpack.js.org/)/[Reactstrap](https://reactstrap.github.io/)
7+
Get start with [React](https://facebook.github.io/react/), [Redux](http://redux.js.org/), [RR4](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom), [Webpack3](https://webpack.js.org/) 🚀
88

99
>2017/8/29
1010
checkout branch mobx to see the version mobx instead of redux!
1111

1212
[中文](https://github.com/YutHelloWorld/vortex-react/blob/master/README-zh.md)
1313

14-
## Table of Contents
14+
<details>
15+
<summary><strong>Table of Contents</strong></summary>
16+
17+
* [Feature](#feature)
18+
* [Get Start](#get-start)
19+
+ [Installation](#installation)
20+
+ [Running](#running)
21+
+ [Scripts](#scripts)
22+
* [Project Structure](#project-structure)
23+
+ [File Tree](#file-tree)
24+
+ [Data Flow](#data-flow)
25+
+ [Logic](#logic)
26+
* [Live Development](#live-development)
27+
* [Deploy](#deploy)
28+
* [Code Style](#code-style)
29+
* [More](#more)
30+
31+
</details>
1532

16-
- [Feature](#feature)
17-
18-
- [Get Start](#get-start)
19-
20-
- [Install](#install)
21-
- [Run](#run)
22-
- [Scripts](#scripts)
23-
24-
- [Project Structure](#project-structure)
25-
26-
- [File Tree](#file-tree)
27-
- [Data Flow](#data-flow)
28-
- [Logic](#logic)
29-
30-
- [Live Development](#live-development)
31-
32-
- [Deploy](#deploy)
33-
34-
- [Code Style](#code-style)
35-
36-
- [More](#more)
33+
---
3734

3835
## Feature
3936

4037
- React
41-
- ES6/7/8 + Babel
42-
- Webpack 3
38+
- ES6 + Babel
39+
- Webpack3
4340
- Redux
4441
- React-Router v4
4542
- Reactstrap + Bootstrap\^4.0.0-alpha.6 (UI)
@@ -58,19 +55,19 @@ Before the start, we recommend you read these documentation.
5855
- [React-Router-Dom](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom)
5956
- [ES6](http://babeljs.io/learn-es2015/)
6057

61-
You can tru ES6 and JSX in [Babel REPL](http://babeljs.io/repl/).
58+
You can try ES6 and JSX in [Babel REPL](http://babeljs.io/repl/).
6259

6360
> We recommend node 6.x + npm 5.x + yarn ^0.27.5。
6461
65-
### Install
62+
### Installation
6663

6764
```bash
6865
git clone https://github.com/yuthelloworld/vortex-react.git <my-project-name>
6966
cd <my-project-name>
70-
yarn # Install project dependencies (or `cnpm install`)
67+
yarn # Install project dependencies (or `npm install`)
7168
```
7269

73-
### Run
70+
### Running
7471

7572
```bash
7673
yarn start # Start the development server (or `npm start`)
@@ -135,7 +132,7 @@ yarn start # Start the development server (or `npm start`)
135132

136133
## Live Development
137134

138-
We use `webpack-dev-middleware`abd`webpack-hot-middleware` for server and HMR 。
135+
We use `webpack-dev-middleware` and `webpack-hot-middleware` for server and HMR 。
139136

140137
We recommend using [Redux DevTools Chrome Extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd).
141138

@@ -153,13 +150,13 @@ This is an exmaple in ubuntu:
153150
sudo apt-get install nginx
154151
```
155152

156-
- Config
153+
- Configure
157154

158155
```bash
159156
sudo vi /etc/nginx/sites-available/default
160157
```
161158

162-
- Copy the flowing to config
159+
- Copy the flowing to configure
163160

164161
```bash
165162
server{
@@ -188,4 +185,4 @@ Refrence [airbnb/javascript](https://github.com/airbnb/javascript)、[Javascript
188185

189186
## More
190187

191-
Welcom PR and issues!
188+
Welcome PRs and issues!

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
"axios": "^0.16.2",
2222
"bootstrap": "4.0.0-alpha.6",
2323
"compression": "^1.6.2",
24-
"express": "^4.14.0",
24+
"express": "^4.15.4",
2525
"object-assign": "^4.1.1",
26-
"promise": "^7.1.1",
26+
"promise": "^8.0.1",
2727
"prop-types": "^15.5.10",
2828
"react": "^15.6.1",
2929
"react-dom": "^15.5.4",
30-
"react-redux": "^5.0.4",
31-
"react-router-dom": "^4.1.2",
30+
"react-redux": "^5.0.6",
31+
"react-router-dom": "^4.2.2",
3232
"react-spinkit": "^3.0.0",
3333
"react-transition-group": "^1.1.2",
3434
"reactstrap": "^4.8.0",
@@ -38,41 +38,40 @@
3838
"whatwg-fetch": "^2.0.3"
3939
},
4040
"devDependencies": {
41-
"ajv": "^4.11.8",
42-
"babel-core": "^6.24.1",
41+
"babel-core": "^6.26.0",
4342
"babel-eslint": "^7.2.3",
44-
"babel-loader": "^7.0.0",
43+
"babel-loader": "^7.1.2",
4544
"babel-plugin-syntax-dynamic-import": "^6.18.0",
4645
"babel-plugin-transform-class-properties": "^6.24.1",
47-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
46+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
4847
"babel-plugin-transform-runtime": "^6.15.0",
4948
"babel-preset-env": "^1.4.0",
5049
"babel-preset-react": "^6.24.1",
51-
"babel-runtime": "^6.20.0",
52-
"chalk": "^1.1.3",
53-
"cross-env": "^5.0.0",
54-
"css-loader": "^0.28.1",
55-
"eslint": "^3.19.0",
50+
"babel-runtime": "^6.26.0",
51+
"chalk": "^2.1.0",
52+
"cross-env": "^5.0.5",
53+
"css-loader": "^0.28.5",
54+
"eslint": "^4.5.0",
5655
"eslint-config-standard": "^10.2.1",
5756
"eslint-config-standard-react": "^5.0.0",
5857
"eslint-plugin-babel": "^4.1.1",
5958
"eslint-plugin-import": "^2.2.0",
60-
"eslint-plugin-node": "^4.2.2",
59+
"eslint-plugin-node": "^5.1.1",
6160
"eslint-plugin-promise": "^3.5.0",
62-
"eslint-plugin-react": "^7.0.1",
61+
"eslint-plugin-react": "^7.3.0",
6362
"eslint-plugin-standard": "^3.0.1",
6463
"extract-text-webpack-plugin": "^3.0.0",
6564
"figures": "^2.0.0",
6665
"file-loader": "^0.11.1",
67-
"fs-extra": "^3.0.1",
66+
"fs-extra": "^4.0.1",
6867
"html-webpack-plugin": "^2.24.1",
6968
"node-sass": "^4.5.3",
7069
"rimraf": "^2.6.1",
7170
"sass-loader": "^6.0.5",
72-
"style-loader": "^0.17.0",
71+
"style-loader": "^0.18.2",
7372
"url-loader": "^0.5.8",
7473
"webpack": "^3.5.5",
75-
"webpack-dev-middleware": "^1.8.4",
76-
"webpack-hot-middleware": "^2.13.2"
74+
"webpack-dev-middleware": "^1.12.0",
75+
"webpack-hot-middleware": "^2.18.2"
7776
}
7877
}

src/main.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ if (__DEV__) {
4444
module.hot.accept([
4545
'./components/App',
4646
'./routes/index',
47-
], () =>
48-
setImmediate(() => {
49-
ReactDOM.unmountComponentAtNode(MOUNT_NODE)
50-
render()
51-
})
47+
], () => setImmediate(() => {
48+
ReactDOM.unmountComponentAtNode(MOUNT_NODE)
49+
render()
50+
})
5251
)
5352
}
5453
}

0 commit comments

Comments
 (0)