Skip to content

Commit bd84031

Browse files
author
andresn
committed
adding object rest spread and class property JS support
1 parent 96d702d commit bd84031

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.babelrc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
{
2-
"presets": ["react", "env"]
2+
"presets": ["react", "env"],
3+
"plugins": [
4+
[
5+
// See: https://github.com/babel/babel-preset-env/issues/49
6+
"transform-object-rest-spread",
7+
{
8+
"useBuiltIns": true
9+
}
10+
],
11+
"transform-class-properties"
12+
]
313
}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# ReduxSimpleStarterRefreshed
22

3-
This fork contains the following updates as of 3/27/2018:
3+
This fork contains the following updates as of 3/28/2018:
44
- Upgraded to React 16.
55
- Upgraded to React-Redux 5.
66
- Upgraded to Webpack 4.
7-
- Changed babel preset to 'env': https://www.npmjs.com/package/babel-preset-env
7+
- Changed babel preset to 'env': https://www.npmjs.com/package/babel-preset-env
88
- Moved from using Mocha/Chai to Jest/Enzyme.
99
- Package control using Yarn instead of NPM.
10+
- Added support for JS object rest spread (...destructuring) and class properties.
1011

1112
Interested in learning [Redux](https://www.udemy.com/react-redux/)?
1213

@@ -38,4 +39,4 @@ This repo uses Jest and Enzyme for testing. Here's a great video intro: https://
3839
```
3940
> yarn test
4041
> yarn test:watch # tests will run as you make modifications
41-
```
42+
```

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"author": "",
1313
"license": "ISC",
1414
"devDependencies": {
15+
"babel-jest": "^22.4.3",
1516
"enzyme": "^3.3.0",
1617
"enzyme-adapter-react-16": "^1.1.1",
1718
"jest": "^22.4.3",
@@ -22,6 +23,9 @@
2223
},
2324
"dependencies": {
2425
"babel-loader": "^7.1.4",
26+
"babel-plugin-transform-class-properties": "^6.24.1",
27+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
28+
"babel-polyfill": "^6.26.0",
2529
"babel-preset-env": "^1.6.1",
2630
"babel-preset-react": "^6.24.1",
2731
"react": "^16.2.0",

0 commit comments

Comments
 (0)