Skip to content

Commit 3142fa1

Browse files
committed
update webpack4
1 parent 68c831b commit 3142fa1

File tree

18 files changed

+7486
-521
lines changed

18 files changed

+7486
-521
lines changed

.babelrc

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
{
22
"presets": [
3-
["es2015", { "modules": false }],
4-
"stage-0",
5-
"react",
6-
"airbnb"
3+
"env",
4+
"react",
5+
"stage-0"
76
],
87
"plugins": [
98
"transform-runtime",
109
"transform-decorators-legacy",
1110
"transform-class-properties",
1211
"transform-object-rest-spread",
1312
"react-hot-loader/babel"
14-
],
15-
"env": {
16-
"test": {
17-
"plugins": [
18-
"transform-decorators-legacy",
19-
"transform-object-rest-spread",
20-
"istanbul"
21-
]
22-
}
23-
}
24-
}
13+
]
14+
}

.eslintrc

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"node": true,
66
"mocha": true
77
},
8+
"globals": {
9+
"ENV": false
10+
},
811
"extends": "airbnb",
912
"rules": {
1013
"linebreak-style": 0,
@@ -21,16 +24,45 @@
2124
"react/sort-comp": 0,
2225
"indent": 0,
2326
"quotes": 0,
24-
"comma-dangle": ["off"],
25-
"no-unused-vars": ["warn"],
26-
"object-curly-spacing": ["off"],
27-
"padded-blocks": ["off"],
28-
"react/jsx-closing-bracket-location": ["off"],
29-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
30-
"react/jsx-space-before-closing": ["off"],
31-
"react/prefer-stateless-function": ["off"],
32-
"no-underscore-dangle": [ "error", { "allowAfterThis": true }],
33-
"import/no-unresolved": ["error", {
27+
"comma-dangle": [
28+
"off"
29+
],
30+
"no-unused-vars": [
31+
"warn"
32+
],
33+
"object-curly-spacing": [
34+
"off"
35+
],
36+
"padded-blocks": [
37+
"off"
38+
],
39+
"react/jsx-closing-bracket-location": [
40+
"off"
41+
],
42+
"react/jsx-filename-extension": [
43+
1,
44+
{
45+
"extensions": [
46+
".js",
47+
".jsx"
48+
]
49+
}
50+
],
51+
"react/jsx-space-before-closing": [
52+
"off"
53+
],
54+
"react/prefer-stateless-function": [
55+
"off"
56+
],
57+
"no-underscore-dangle": [
58+
"error",
59+
{
60+
"allowAfterThis": true
61+
}
62+
],
63+
"import/no-unresolved": [
64+
"error",
65+
{
3466
"ignore": [
3567
"components/",
3668
"config/",
@@ -41,9 +73,12 @@
4173
"theme/",
4274
"utils/"
4375
]
44-
}],
45-
"import/no-extraneous-dependencies": ["off"],
76+
}
77+
],
78+
"import/no-extraneous-dependencies": [
79+
"off"
80+
],
4681
"import/extensions": "off",
4782
"global-require": "off"
4883
}
49-
}
84+
}

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Simple React Start Kit 2017
22

3-
這個環境包可以讓你快速體驗 ReactJS 開發環境的便利,我們並沒有在裏面放入太多套件(例如 redux, karma),希望可以讓你用最簡單的環境開始學習 React
3+
這個環境包可以讓你快速體驗 ReactJS 開發環境的便利,我們並沒有在裏面放入額外的套件(例如 redux, karma),希望可以讓你用最簡單的環境開始學習 React
44

55
## 特色
66

77
* [react 16](https://github.com/facebook/react)
88
* [react-router 4](https://reacttraining.com/react-router/web/example/basic)
9-
* [webpack 3](https://github.com/webpack/webpack)
10-
* [babel stage-0](https://github.com/babel/babel)
9+
* [webpack 4](https://github.com/webpack/webpack)
10+
* [babel 6](https://github.com/babel/babel)
1111
* [eslint](http://eslint.org)
1212

1313
## 需求配置
14-
* node `^4.5.0`
15-
* npm `^3.0.0`
14+
* node `^6.11.5`
15+
* npm `^3.10.10`
1616

1717
## 開始
1818

19-
先確定好安裝了 node 4.5 以上的版本,接著就可以輸入以下指令
19+
先確定好安裝了 node 6.11.5 以上的版本,接著就可以輸入以下指令
2020

2121
```bash
2222
$ git clone https://github.com/ReactMaker/simple_react_start_kit_2017
@@ -27,7 +27,7 @@ $ npm start # Compile and launch
2727

2828
如果一切成功,就會看到以下畫面,並且瀏覽器會打開的範例頁面
2929

30-
![Imgur](http://i.imgur.com/14aROBn.png)
30+
![Imgur](https://i.imgur.com/MLcE6SO.png)
3131

3232
開發當中最常用到的是 `npm start` 指令,我們還有一些其他的指令要介紹給你知道
3333

conf/webpack/Base.js

Lines changed: 0 additions & 128 deletions
This file was deleted.

conf/webpack/Dev.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

conf/webpack/Dist.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)