Skip to content

Commit b39b696

Browse files
committed
Clean code & doc enhancement & url router issue fix
1 parent ac27cb9 commit b39b696

11 files changed

+25
-285
lines changed

README-zh.md

-56
This file was deleted.

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@
22

33

44
JavaScript library boilerplate, a web project template using:
5-
> JavaScript Library - [React](https://facebook.github.io/react/);
6-
> UI Library - [React Bootstrap](https://react-bootstrap.github.io/);
5+
> JavaScript Library - [React](https://facebook.github.io/react/);
6+
> Application Architecture - [Redux](http://redux.js.org/);
7+
> Declarative routing for React - [React Router](https://github.com/ReactTraining/react-router);
8+
> React Components that Implement Google's Material Design. - [Material UI](https://github.com/callemall/material-ui);
9+
> Mock Server based on Express - [Mock Server](https://shinxi.github.io/react/#/6/1);
710
> Future ECMASCript Standards - [ES6+](http://babeljs.io/docs/learn-es2015/);
811
> Javascript Compiler - [Babel](http://babeljs.io/);
9-
> Application Architecture - [Redux](http://redux.js.org/);
1012
> Module Bundler - [webpack](http://webpack.github.io/docs/tutorials/getting-started/);
11-
> Javascript Test Runner - [Karma](https://karma-runner.github.io/0.13/index.html);
12-
> Test Framework - [Mocha](http://mochajs.org/);
13-
> Tests Assertion - [Chai](http://chaijs.com/);
14-
> Test spies/stubs/mocks - [Sinon](http://sinonjs.org/).
1513
1614
### Features
1715

1816
### Getting Started
1917

2018
* Follow the [getting started guide](./getting-started.md) to download and run the project
2119

20+
### Build & Deploy
21+
* Follow [Build Doc](./build.md) to build and deploy your project.
22+
2223
### Directory Layout
2324

2425
```
@@ -45,7 +46,6 @@ JavaScript library boilerplate, a web project template using:
4546

4647
* [Getting Started with React.js](http://facebook.github.io/react/)
4748
* [Redux Intro](http://redux.js.org/)
48-
* [Getting Started with React Bootstarp](https://react-bootstrap.github.io/getting-started.html)
4949
* [Getting Started with Webpack](https://webpack.github.io/docs/tutorials/getting-started/)
5050
* [Learn ES6](https://babeljs.io/docs/learn-es6/)
5151
* [ES6 Features](https://github.com/lukehoban/es6features#readme)

build.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Build
2+
3+
Let's say your project name is Foo.
4+
5+
* cd to Foo.
6+
* `npm run prod`
7+
The command will generate all static files into build folder.
8+
* `npm run start:prod`
9+
You can test the build by run `npm run start:prod`, the command will bring up a node server which servers all static files under build foler.
10+
Visit [http://localhost:5000](http://localhost:5000). If it works well, you'll see the page runs up.
11+
* Deploy.
12+
Put the files under build folder into your web server.

getting-started-zh.md

-29
This file was deleted.

how-to-configure-text-editors-zh.md

-61
This file was deleted.

karma.conf.js

-48
This file was deleted.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "react-boilerplate",
2+
"name": "react-material-ui-boilerplate",
33
"version": "1.0.0-alpha",
4-
"description": "React BoilerPlate with material-ui",
4+
"description": "BoilerPlate For React + Material UI + React Router + Redux",
55
"scripts": {
66
"start": "webpack-dev-server --port 3000",
77
"server": "nodemon server/index.js -w server/",
88
"prod": "webpack -p --config webpack.config.prod.js --progress --colors",
9-
"start:prod": "node scripts/startProduct.js"
9+
"start:prod": "node server/index.js"
1010
},
1111
"babel": {
1212
"presets": [
@@ -33,9 +33,9 @@
3333
"babel-preset-es2015": "^6.3.13",
3434
"babel-preset-react": "^6.3.13",
3535
"babel-runtime": "^6.18.0",
36+
"body-parser": "^1.15.2",
3637
"chai": "^3.5.0",
3738
"cookie-parser": "^1.4.3",
38-
"body-parser": "^1.15.2",
3939
"copy-webpack-plugin": "^4.0.1",
4040
"css-loader": "^0.26.1",
4141
"express": "^4.13.3",

scripts/startProduct.js

-20
This file was deleted.

server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ app.use('/', express.static(path.join(__dirname, '../build')));
2020

2121

2222
app.get("*", function(req, res) {
23-
res.sendFile(__dirname + '/../build/index.html')
23+
res.sendFile(path.join(__dirname, '/../build/index.html'));
2424
})
2525

2626
var server = app.listen(app.get('port'), function() {

tests.webpack.js

-4
This file was deleted.

tests/components/HeaderTest.js

-54
This file was deleted.

0 commit comments

Comments
 (0)