Skip to content

Commit

Permalink
Use hot reloading in bike share example (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-wade authored Jul 15, 2016
1 parent f230bec commit f154f0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 24 deletions.
12 changes: 0 additions & 12 deletions packages/react-server-examples/bike-share/gulpfile.js

This file was deleted.

12 changes: 3 additions & 9 deletions packages/react-server-examples/bike-share/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,25 @@
"author": "Doug Wade <[email protected]>",
"scripts": {
"clean": "rm -rf build __clientTemp",
"start": "npm run clean && gulp && npm run styles && react-server-cli --routesFile build/routes.js",
"start": "npm run clean && npm run styles && react-server-cli",
"styles": "node-sass styles/index.scss build/styles/index.css && node-sass styles/network.scss build/styles/network.css",
"test": "xo && nsp check"
},
"license": "Apache-2.0",
"dependencies": {
"babel-plugin-transform-runtime": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-runtime": "^6.6.1",
"react": "~0.14.2",
"react-dom": "~0.14.2",
"react-server": "^0.3.1",
"react-server-cli": "^0.3.1",
"react-server": "^0.3.3",
"react-server-cli": "^0.3.3",
"superagent": "1.2.0"
},
"devDependencies": {
"babel-preset-react-server": "^0.3.0",
"eslint-config-xo-react": "^0.7.0",
"eslint-plugin-react": "^5.1.1",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"node-sass": "^3.7.0",
"nsp": "^2.3.3",
"react-server-gulp-module-tagger": "^0.3.0",
"xo": "^0.15.1"
},
"xo": {
Expand Down
7 changes: 5 additions & 2 deletions packages/react-server-examples/bike-share/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React from 'react';
import {ReactServerAgent, RootElement, TheFold} from 'react-server';
import {ReactServerAgent, RootElement, TheFold, logging} from 'react-server';
import NetworkList from '../components/network-list';
import Header from '../components/header';
import Footer from '../components/footer';
import '../styles/index.css';
import '../build/styles/index.css';

const logger = logging.getLogger(__LOGGER__);

export default class IndexPage {
handleRoute(next) {
logger.info('handling index');
this.data = ReactServerAgent.get('/api/networks').then(d => d.body.body);
return next();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server-examples/bike-share/pages/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import NetworkCard from '../components/network-card';
import StationList from '../components/station-list';
import Header from '../components/header';
import Footer from '../components/footer';
import '../styles/network.css';
import '../build/styles/network.css';

const logger = logging.getLogger(__LOGGER__);

Expand Down

0 comments on commit f154f0a

Please sign in to comment.