Skip to content

Commit a5ecf0c

Browse files
committed
Update examples to Babel 6
1 parent a488403 commit a5ecf0c

File tree

5 files changed

+24
-42
lines changed

5 files changed

+24
-42
lines changed

examples/counter/.babelrc

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
{
2-
"stage": 2,
3-
"env": {
4-
"development": {
5-
"plugins": [
6-
"react-transform"
7-
],
8-
"extra": {
9-
"react-transform": {
10-
"transforms": [{
11-
"transform": "react-transform-hmr",
12-
"imports": ["react"],
13-
"locals": ["module"]
14-
}]
15-
}
16-
}
17-
}
18-
}
2+
"presets": [ "es2015", "stage-0", "react" ],
3+
"plugins": [ "add-module-exports", "transform-decorators-legacy" ]
194
}

examples/counter/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@
2424
"redux-thunk": "^0.1.0"
2525
},
2626
"devDependencies": {
27-
"babel-core": "^5.6.18",
28-
"babel-loader": "^5.1.4",
29-
"babel-plugin-react-transform": "^1.1.0",
27+
"babel-core": "^6.3.15",
28+
"babel-loader": "^6.2.0",
29+
"babel-plugin-add-module-exports": "^0.1.1",
30+
"babel-plugin-react-transform": "^2.0.0-beta1",
31+
"babel-plugin-transform-decorators-legacy": "^1.2.0",
32+
"babel-polyfill": "^6.3.14",
33+
"babel-preset-es2015": "^6.3.13",
34+
"babel-preset-react": "^6.3.13",
35+
"babel-preset-stage-0": "^6.3.13",
3036
"expect": "^1.6.0",
3137
"express": "^4.13.3",
3238
"jsdom": "^5.6.1",

examples/todomvc/.babelrc

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
{
2-
"stage": 2,
3-
"env": {
4-
"development": {
5-
"plugins": [
6-
"react-transform"
7-
],
8-
"extra": {
9-
"react-transform": {
10-
"transforms": [{
11-
"transform": "react-transform-hmr",
12-
"imports": ["react"],
13-
"locals": ["module"]
14-
}]
15-
}
16-
}
17-
}
18-
}
19-
}
2+
"presets": [ "es2015", "stage-0", "react" ],
3+
"plugins": [ "add-module-exports", "transform-decorators-legacy" ]
4+
}

examples/todomvc/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'babel-core/polyfill';
1+
import 'babel-polyfill';
22
import React from 'react';
33
import { render } from 'react-dom';
44
import { Provider } from 'react-redux';

examples/todomvc/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@
2424
"redux": "^3.0.0"
2525
},
2626
"devDependencies": {
27-
"babel-core": "^5.6.18",
28-
"babel-loader": "^5.1.4",
29-
"babel-plugin-react-transform": "^1.1.0",
27+
"babel-core": "^6.3.15",
28+
"babel-loader": "^6.2.0",
29+
"babel-plugin-add-module-exports": "^0.1.1",
30+
"babel-plugin-react-transform": "^2.0.0-beta1",
31+
"babel-plugin-transform-decorators-legacy": "^1.2.0",
32+
"babel-polyfill": "^6.3.14",
33+
"babel-preset-es2015": "^6.3.13",
34+
"babel-preset-react": "^6.3.13",
35+
"babel-preset-stage-0": "^6.3.13",
3036
"expect": "^1.8.0",
3137
"express": "^4.13.3",
3238
"jsdom": "^5.6.1",

0 commit comments

Comments
 (0)