Skip to content

Commit e8d5a71

Browse files
committed
Change formatting
1 parent 3cd27c2 commit e8d5a71

File tree

9 files changed

+119
-119
lines changed

9 files changed

+119
-119
lines changed

package.json

+35-35
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
2-
"name": "browser-react",
3-
"version": "1.0.0",
4-
"description": "A react version of the browser that allows SSR out of the box along with faster loading times.",
5-
"main": "index.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
9-
"keywords": [
10-
"Alexandria",
11-
"React",
12-
"SSR",
13-
"Browser",
14-
"Decentralized",
15-
"Florincoin",
16-
"FLO",
17-
"OIP"
18-
],
19-
"author": "Skylar Ostler <OstlerDev>",
20-
"license": "GPL-3.0",
21-
"dependencies": {
22-
"babel-cli": "^6.11.4",
23-
"babel-core": "^6.13.2",
24-
"babel-preset-es2015": "^6.13.2",
25-
"babel-preset-react": "^6.11.1",
26-
"ejs": "^2.5.5",
27-
"express": "^4.14.1",
28-
"react": "^15.3.2",
29-
"react-dom": "^15.3.2",
30-
"react-router": "^2.6.1"
31-
},
32-
"devDependencies": {
33-
"babel-loader": "^6.2.10",
34-
"http-server": "^0.9.0",
35-
"webpack": "^1.13.3"
36-
}
2+
"name": "browser-react",
3+
"version": "1.0.0",
4+
"description": "A react version of the browser that allows SSR out of the box along with faster loading times.",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [
10+
"Alexandria",
11+
"React",
12+
"SSR",
13+
"Browser",
14+
"Decentralized",
15+
"Florincoin",
16+
"FLO",
17+
"OIP"
18+
],
19+
"author": "Skylar Ostler <OstlerDev>",
20+
"license": "GPL-3.0",
21+
"dependencies": {
22+
"babel-cli": "^6.11.4",
23+
"babel-core": "^6.13.2",
24+
"babel-preset-es2015": "^6.13.2",
25+
"babel-preset-react": "^6.11.1",
26+
"ejs": "^2.5.5",
27+
"express": "^4.14.1",
28+
"react": "^15.3.2",
29+
"react-dom": "^15.3.2",
30+
"react-router": "^2.6.1"
31+
},
32+
"devDependencies": {
33+
"babel-loader": "^6.2.10",
34+
"http-server": "^0.9.0",
35+
"webpack": "^1.13.3"
36+
}
3737
}

src/app-client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import ReactDOM from 'react-dom';
55
import AppRoutes from './components/AppRoutes';
66

77
window.onload = () => {
8-
ReactDOM.render(<AppRoutes/>, document.getElementById('main'));
8+
ReactDOM.render(<AppRoutes/>, document.getElementById('main'));
99
};

src/components/404.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import React from 'react';
22
import { Link } from 'react-router';
33

44
export default class NotFoundPage extends React.Component {
5-
render() {
6-
return (
7-
<div className="not-found">
8-
<h1>404</h1>
9-
<h2>Page not found!</h2>
10-
<p>
11-
<Link to="/">Go back to the main page</Link>
12-
</p>
13-
</div>
14-
);
15-
}
5+
render() {
6+
return (
7+
<div className="not-found">
8+
<h1>404</h1>
9+
<h2>Page not found!</h2>
10+
<p>
11+
<Link to="/">Go back to the main page</Link>
12+
</p>
13+
</div>
14+
);
15+
}
1616
}

src/components/AppRoutes.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { Router, browserHistory } from 'react-router';
33
import routes from '../routes';
44

55
export default class AppRoutes extends React.Component {
6-
render() {
7-
return (
8-
<Router history={browserHistory} routes={routes} onUpdate={() => window.scrollTo(0, 0)}/>
9-
);
10-
}
6+
render() {
7+
return (
8+
<Router history={browserHistory} routes={routes} onUpdate={() => window.scrollTo(0, 0)}/>
9+
);
10+
}
1111
}

src/components/IndexPage.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import React from 'react';
44
//import athletes from '../data/athletes';
55

66
export default class IndexPage extends React.Component {
7-
render() {
8-
return (
9-
<div className="home">
10-
<div className="athletes-selector">
11-
12-
</div>
13-
</div>
14-
);
15-
}
7+
render() {
8+
return (
9+
<div className="home">
10+
<div className="athletes-selector">
11+
12+
</div>
13+
</div>
14+
);
15+
}
1616
}
1717

1818
//{athletes.map(athleteData => <AthletePreview key={athleteData.id} {...athleteData} />)}

src/components/NotFoundPage.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import React from 'react';
22
import { Link } from 'react-router';
33

44
export default class NotFoundPage extends React.Component {
5-
render() {
6-
return (
7-
<div className="not-found">
8-
<h1>404</h1>
9-
<h2>Page not found!</h2>
10-
<p>
11-
<Link to="/">Go back to the main page</Link>
12-
</p>
13-
</div>
14-
);
15-
}
5+
render() {
6+
return (
7+
<div className="not-found">
8+
<h1>404</h1>
9+
<h2>Page not found!</h2>
10+
<p>
11+
<Link to="/">Go back to the main page</Link>
12+
</p>
13+
</div>
14+
);
15+
}
1616
}

src/components/layout.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import React from 'react';
33
import { Link } from 'react-router';
44

55
export default class Layout extends React.Component {
6-
render() {
7-
return (
8-
<div className="app-container">
9-
<header>
10-
<Link to="/">
11-
<img className="logo" src="/img/logo-judo-heroes.png"/>
12-
</Link>
13-
</header>
14-
<div className="app-content">{this.props.children}</div>
15-
<footer>
16-
<p>
17-
This is a demo app to showcase universal rendering and routing with <strong>React</strong> and <strong>Express</strong>.
18-
</p>
19-
</footer>
20-
</div>
21-
);
22-
}
6+
render() {
7+
return (
8+
<div className="app-container">
9+
<header>
10+
<Link to="/">
11+
<img className="logo" src="/img/logo-judo-heroes.png"/>
12+
</Link>
13+
</header>
14+
<div className="app-content">{this.props.children}</div>
15+
<footer>
16+
<p>
17+
This is a demo app to showcase universal rendering and routing with <strong>React</strong> and <strong>Express</strong>.
18+
</p>
19+
</footer>
20+
</div>
21+
);
22+
}
2323
}

src/data/data.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webpack.config.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@ const webpack = require('webpack');
22
const path = require('path');
33

44
module.exports = {
5-
entry: path.join(__dirname, 'src', 'app-client.js'),
6-
output: {
7-
path: path.join(__dirname, 'src', 'static', 'js'),
8-
filename: 'bundle.js'
9-
},
10-
module: {
11-
loaders: [{
12-
test: path.join(__dirname, 'src'),
13-
loader: ['babel-loader'],
14-
query: {
15-
cacheDirectory: 'babel_cache',
16-
presets: ['react', 'es2015']
17-
}
18-
}]
19-
},
20-
plugins: [
21-
new webpack.DefinePlugin({
22-
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
23-
}),
24-
new webpack.optimize.DedupePlugin(),
25-
new webpack.optimize.OccurenceOrderPlugin(),
26-
new webpack.optimize.UglifyJsPlugin({
27-
compress: { warnings: false },
28-
mangle: true,
29-
sourcemap: false,
30-
beautify: false,
31-
dead_code: true
32-
})
33-
]
5+
entry: path.join(__dirname, 'src', 'app-client.js'),
6+
output: {
7+
path: path.join(__dirname, 'src', 'static', 'js'),
8+
filename: 'bundle.js'
9+
},
10+
module: {
11+
loaders: [{
12+
test: path.join(__dirname, 'src'),
13+
loader: ['babel-loader'],
14+
query: {
15+
cacheDirectory: 'babel_cache',
16+
presets: ['react', 'es2015']
17+
}
18+
}]
19+
},
20+
plugins: [
21+
new webpack.DefinePlugin({
22+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
23+
}),
24+
new webpack.optimize.DedupePlugin(),
25+
new webpack.optimize.OccurenceOrderPlugin(),
26+
new webpack.optimize.UglifyJsPlugin({
27+
compress: { warnings: false },
28+
mangle: true,
29+
sourcemap: false,
30+
beautify: false,
31+
dead_code: true
32+
})
33+
]
3434
};

0 commit comments

Comments
 (0)