Skip to content

Commit 24e8049

Browse files
Fix for #3
Added ES2015 preset
1 parent 52defd5 commit 24e8049

File tree

7 files changed

+27
-21
lines changed

7 files changed

+27
-21
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ cache:
77
deploy:
88
provider: npm
99
10-
api_key:
11-
secure: HNtemXD+Dj8hp7E3aKwRdPqzrx7s143IFA9mTRA5Z61T8afI4kX3HB2flmrMdq2dOzi7ujlf7zDEvA6JSWHhXYdY1UOF1OHjt/+hq4p17us5wh5Lqmyf9XXIwjJqW57BhJHLO8tw6EEzaMlZb/AjeOLEWuds0949Hx410YeccXqKQQSSgwuKUTpcH/vPkegXAK9m+Xbhxpp+rN3HlbvlKveh4Dm3LrpPTHIgtLjLtA6S7pwSX7qkNlLVB7YCUUzRzil6TDwzgBV7y+b/U7qA9WfU/07bl/p/4CEnf0/KfnT82OGIDr5yRVs5fCF13Em6stou3BKGmOFUN2OUC7XsaRbvcEeRxtia5BraYlEf/VgVr2bhJ5sNrXqBm6fWfkYt/ft4XC32d5KAw47p6fBwmaXnNKnwSKquVq0xydO+i9NW/77qhjMaXEqqBDd8qMnyyPrwvyR1SfnoFp0ZIF1dVjwiKQCXLCsnOeRQfpHdBTA9OME1O3XxrnpQdk2UetXsQwic0FhhrEEpefce2CMkkmVPilyNl5/9nmptDzBqQeZrTDLv0drXHYSXQ//oWzylXFP8m1S4YReJWQa1AluLlu186V1WsreP+GeeCtTq7KMFk4g/AERSmACaHfT9VYRhB13r1f9i50w3XCC2IJWIeoZocHzk3z/d/AjFeS98fH8=
10+
api_key: $NPM_TOKEN
1211
skip_cleanup: true
1312
on:
1413
tags: true

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Webpack Dev Middleware for simple and painless development and production usage.
2222
## Installation
2323

2424
```bash
25-
npm install create-react-server babel-preset-react-app --save-dev
25+
npm install create-react-server babel-preset-react-app babel-preset-es2015 --save-dev
2626
```
2727

2828
You don't have to install `babel-preset-react-app` if you use Create React App, it will be pre-installed already.
@@ -51,6 +51,7 @@ npm run redeploy # launch in production mode
5151
```json
5252
{
5353
"presets": [
54+
"es2015",
5455
"react-app"
5556
]
5657
}
@@ -232,7 +233,7 @@ Available options:
232233
- `--template` or `-t` path to JS file with `template` function
233234
- `--outputPath` or `-o` as path to your `build` (e.g. your static files)
234235
- `--templatePath` or `-i` path to your `index.html`
235-
- `--debug` or `-d` if you want to get more information of requests handling
236+
- `--debug` or `-d` if you want to get more information of requests handling & stack traces of errors
236237
- `--port` or `-p` to bind to something other than `3000`, port will also be automatically taken from `process.env.PORT`
237238

238239

@@ -522,6 +523,7 @@ And add it to `.babelrc` file or `babel` section of `package.json`:
522523
```json
523524
{
524525
"presets": [
526+
"es2015",
525527
"react-app"
526528
],
527529
"plugins": [

examples/create-react-app/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
},
99
"babel": {
1010
"presets": [
11+
"es2015",
1112
"react-app"
1213
],
1314
"plugins": [
@@ -19,16 +20,17 @@
1920
"isomorphic-fetch": "^2.2.1",
2021
"react": "^15.4.2",
2122
"react-dom": "^15.4.2",
22-
"react-helmet": "^4.0.0",
23+
"react-helmet": "^5.1.3",
2324
"react-redux": "^5.0.3",
24-
"react-router": "^3.0.2",
25+
"react-router": "^3.0.5",
2526
"redux": "^3.6.0",
26-
"redux-logger": "^2.8.2",
27+
"redux-logger": "^3.0.6",
2728
"redux-promise-middleware": "^4.2.0",
2829
"redux-thunk": "^2.2.0"
2930
},
3031
"devDependencies": {
3132
"babel-plugin-transform-ensure-ignore": "^0.1.0",
32-
"react-scripts": "^0.9.5"
33+
"babel-preset-es2015": "^6.24.1",
34+
"react-scripts": "^1.0.7"
3335
}
3436
}

examples/create-react-app/src/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {applyMiddleware, compose, createStore, combineReducers} from "redux";
2-
import createLogger from "redux-logger";
2+
import {createLogger} from "redux-logger";
33
import thunk from "redux-thunk";
44
import promiseMiddleware from "redux-promise-middleware";
55

examples/create-react-app/template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {rewind} from "react-helmet";
1+
import Helmet from "react-helmet";
22

33
export default ({template, html, error}) => {
44

55
//@see https://github.com/nfl/react-helmet#server-usage
6-
const head = rewind();
6+
const head = Helmet.renderStatic();
77

88
const errorHtml = error
99
? `<div id="server-error"><h1>Server Error</h1><pre>${error.stack || error}</pre></div>`

examples/webpack-blocks/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"babel": {
1111
"presets": [
12+
"es2015",
1213
"react-app"
1314
],
1415
"plugins": [
@@ -21,11 +22,11 @@
2122
"isomorphic-fetch": "^2.2.1",
2223
"react": "^15.4.2",
2324
"react-dom": "^15.4.2",
24-
"react-helmet": "^4.0.0",
25+
"react-helmet": "^5.1.3",
2526
"react-redux": "^5.0.3",
26-
"react-router": "^3.0.2",
27+
"react-router": "^3.0.5",
2728
"redux": "^3.6.0",
28-
"redux-logger": "^2.8.1",
29+
"redux-logger": "^3.0.6",
2930
"redux-promise-middleware": "^4.2.0",
3031
"redux-thunk": "^2.2.0"
3132
},
@@ -34,14 +35,14 @@
3435
"@webpack-blocks/dev-server2": "^0.4.0",
3536
"@webpack-blocks/webpack2": "^0.4.0",
3637
"babel-cli": "^6.23.0",
37-
"babel-plugin-dynamic-import-webpack": "^1.0.1",
3838
"babel-plugin-syntax-dynamic-import": "^6.18.0",
3939
"babel-plugin-transform-ensure-ignore": "^0.1.0",
40-
"babel-preset-react-app": "^2.1.1",
40+
"babel-preset-es2015": "^6.24.1",
41+
"babel-preset-react-app": "^3.0.0",
4142
"express": "^4.14.1",
4243
"html-webpack-plugin": "^2.28.0",
4344
"rimraf": "^2.6.1",
44-
"webpack": "^2.2.1",
45+
"webpack": "^3.0.0",
4546
"webpack-dev-server": "^2.4.1"
4647
}
4748
}

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-server",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Server & middleware for React + Router + Redux with Server Side Rendering",
55
"scripts": {
66
"test": "jest",
@@ -14,6 +14,7 @@
1414
},
1515
"babel": {
1616
"presets": [
17+
"es2015",
1718
"react-app"
1819
],
1920
"plugins": [
@@ -26,8 +27,9 @@
2627
},
2728
"devDependencies": {
2829
"babel-plugin-transform-ensure-ignore": "^0.1.0",
29-
"babel-preset-react-app": "^2.2.0",
30-
"jest": "^19.0.2",
30+
"babel-preset-es2015": "^6.24.1",
31+
"babel-preset-react-app": "^3.0.0",
32+
"jest": "^20.0.4",
3133
"memory-fs": "^0.4.1",
3234
"node-fetch": "^1.6.3",
3335
"react": "^15.4.2",
@@ -42,7 +44,7 @@
4244
"express": "^4.14.1",
4345
"hoist-non-react-statics": "^1.2.0",
4446
"prop-types": "^15.5.8",
45-
"yargs": "^7.0.2"
47+
"yargs": "^8.0.2"
4648
},
4749
"peerDependencies": {
4850
"react": "*",

0 commit comments

Comments
 (0)