Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 8f8647f

Browse files
authored
Merge pull request #1 from lighthouse-labs/master
2 parents 7d5ad8f + d465470 commit 8f8647f

File tree

12 files changed

+83
-43
lines changed

12 files changed

+83
-43
lines changed

.eslintrc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"ecmaFeatures": {
3-
"jsx": true,
4-
"modules": true
2+
"parserOptions": {
3+
"sourceType": "module",
4+
"ecmaFeatures": {
5+
"jsx": true
6+
}
57
},
68
"env": {
79
"browser": true,
810
"node": true
911
},
10-
"parser": "babel-eslint",
1112
"rules": {
1213
"quotes": [2, "single"],
1314
"strict": [2, "never"],
@@ -17,5 +18,6 @@
1718
},
1819
"plugins": [
1920
"react"
20-
]
21+
],
22+
"extends": ["eslint:recommended", "plugin:react/recommended"]
2123
}

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,40 @@ A minimal and light dev environment for ReactJS.
55

66
### Usage
77

8+
Clone the boilerplate and create your own git repo.
9+
10+
```
11+
git clone git@github.com:lighthouse-labs/react-simple-boilerplate.git
12+
git remote rm origin
13+
git remote add origin [YOUR NEW REPOSITORY]
14+
# Manually update your package.json file
15+
```
16+
17+
Install the dependencies and start the server.
18+
819
```
920
npm install
1021
npm start
1122
open http://localhost:3000
1223
```
1324

25+
### Static Files
26+
27+
You can store static files like images, fonts, etc in the `build` folder.
28+
29+
For example, if you copy a file called my_image.png into the build folder you can access it using `http://localhost:3000/build/my_image.png`.
30+
1431
### Linting
1532

1633
This boilerplate project includes React ESLint configuration.
1734

1835
```
19-
npm run test
36+
npm run lint
2037
```
2138

2239
### Dependencies
2340

2441
* React
2542
* Webpack
2643
* [babel-loader](https://github.com/babel/babel-loader)
27-
* [webpack-dev-server](https://github.com/webpack/webpack-dev-server)
44+
* [webpack-dev-server](https://github.com/webpack/webpack-dev-server)

build/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "Simple and lightweight Boilerplate for ReactJS projects",
55
"scripts": {
6-
"test": "eslint src",
6+
"lint": "eslint src",
77
"start": "node server.js"
88
},
99
"repository": {
@@ -26,18 +26,22 @@
2626
},
2727
"homepage": "https://github.com/noahlotzer/react-simple-boilerplate",
2828
"devDependencies": {
29-
"babel-core": "^6.0.20",
30-
"babel-eslint": "^4.1.3",
31-
"babel-loader": "^6.0.1",
32-
"babel-preset-es2015": "^6.0.15",
33-
"babel-preset-react": "^6.0.15",
34-
"babel-preset-stage-0": "^6.0.15",
35-
"eslint-plugin-react": "^3.6.2",
36-
"webpack": "^1.12.2",
37-
"webpack-dev-server": "^1.12.1"
29+
"babel-core": "6.10.4",
30+
"babel-loader": "6.0.1",
31+
"babel-preset-es2015": "6.9.0",
32+
"babel-preset-react": "6.11.1",
33+
"babel-preset-stage-0": "6.5.0",
34+
"css-loader": "0.23.1",
35+
"eslint": "2.7.0",
36+
"eslint-plugin-react": "5.2.2",
37+
"node-sass": "3.8.0",
38+
"sass-loader": "4.0.0",
39+
"style-loader": "0.13.1",
40+
"webpack": "1.13.1",
41+
"webpack-dev-server": "1.14.1"
3842
},
3943
"dependencies": {
40-
"react": "^0.14.0",
41-
"react-dom": "^0.14.0"
44+
"react": "15.2.1",
45+
"react-dom": "15.2.1"
4246
}
4347
}

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ var config = require('./webpack.config');
55
new WebpackDevServer(webpack(config), {
66
publicPath: config.output.publicPath
77
})
8-
.listen(3000, 'localhost', function (err, result) {
8+
.listen(3000, '0.0.0.0', function (err, result) {
99
if (err) {
1010
console.log(err);
1111
}
1212

13-
console.log('Running at http://localhost:3000');
13+
console.log('Running at http://0.0.0.0:3000');
1414
});

src/App.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/App.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, {Component} from 'react';
2+
3+
class App extends Component {
4+
render() {
5+
return (
6+
<h1>Hello React :)</h1>
7+
);
8+
}
9+
}
10+
export default App;

src/index.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/index.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Application entrypoint.
2+
3+
// Load up the application styles
4+
require("../styles/application.scss");
5+
6+
// Render the top-level React component
7+
import React from 'react';
8+
import ReactDOM from 'react-dom';
9+
import App from './App.jsx';
10+
11+
ReactDOM.render(<App />, document.getElementById('react-root'));

styles/application.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This is the top-level scss file. Import all other files in here.
2+
@import 'home';

0 commit comments

Comments
 (0)