Skip to content

Commit ccf44fa

Browse files
committed
Update to Babel 6
1 parent ca5db2a commit ccf44fa

File tree

3 files changed

+32
-34
lines changed

3 files changed

+32
-34
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"stage": 0
2+
"presets": ["es2015", "stage-0"]
33
}

README.md

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,41 +33,36 @@ It must be an array of the transforms you want to use:
3333

3434
```js
3535
{
36-
"stage": 0,
36+
"presets": ["es2015", "stage-0"],
3737
"env": {
3838
// only enable it when process.env.NODE_ENV is 'development' or undefined
3939
"development": {
40-
"plugins": ["react-transform"],
41-
"extra": {
42-
// must be an object
43-
"react-transform": {
44-
// must be an array
45-
"transforms": [{
46-
"transform": "react-transform-catch-errors",
47-
// now go the imports!
48-
"imports": [
49-
50-
// the first import is your React distribution
51-
// (if you use React Native, pass "react-native" instead)
52-
53-
"react",
54-
55-
// the second import is the React component to render error
56-
// (it can be a local path too, like "./src/ErrorReporter")
57-
58-
"redbox-react",
59-
60-
// the third import is OPTIONAL!
61-
// when specified, its export is used as options to the reporter.
62-
// see specific reporter's docs for the options it needs.
63-
64-
// "./src/reporterOptions"
65-
]
66-
}]
67-
// note: you can put more transforms into array
68-
// this is just one of them!
69-
}
70-
}
40+
"plugins": [["react-transform", {
41+
"transforms": [{
42+
"transform": "react-transform-catch-errors",
43+
// now go the imports!
44+
"imports": [
45+
46+
// the first import is your React distribution
47+
// (if you use React Native, pass "react-native" instead)
48+
49+
"react",
50+
51+
// the second import is the React component to render error
52+
// (it can be a local path too, like "./src/ErrorReporter")
53+
54+
"redbox-react",
55+
56+
// the third import is OPTIONAL!
57+
// when specified, its export is used as options to the reporter.
58+
// see specific reporter's docs for the options it needs.
59+
60+
// "./src/reporterOptions"
61+
]
62+
}]
63+
// note: you can put more transforms into array
64+
// this is just one of them!
65+
}]],
7166
}
7267
}
7368
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
"dx"
2828
],
2929
"devDependencies": {
30-
"babel": "^5.8.23",
30+
"babel-cli": "^6.3.17",
31+
"babel-core": "^6.3.21",
32+
"babel-preset-es2015": "^6.3.3",
33+
"babel-preset-stage-0": "^6.3.13",
3134
"rimraf": "^2.4.3"
3235
}
3336
}

0 commit comments

Comments
 (0)