Skip to content

Commit 14c370d

Browse files
committed
changed README
1 parent 642b959 commit 14c370d

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

README.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# React-webpack2-skeleton
22

3-
React-webpack2-skeleton is a lightweight React boilerplate that uses Webpack2. url-loader, sass-loader, and react-hot-loader@3.0.0 have been configured to this project by default.
3+
React-webpack2-skeleton is a lightweight React boilerplate that uses Webpack2.
4+
5+
## Features
6+
- Webpack2 with url-loader, sass-loader, css-loader, babel-loader
7+
- react-hot-loader@3.0.0
8+
- react-router@4.0.0
9+
- Code splitting
10+
- Server rendering with express
11+
12+
> Code Splitting only works in production mode
413
514
## Requirement
615

@@ -16,9 +25,18 @@ $ git clone https://github.com/velopert/react-webpack2-skeleton.git <project-nam
1625
$ cd <project-name>
1726
```
1827

19-
If you do not need react-hot-loader feature, you can checkout the `light` branch.
28+
### Branches
29+
30+
Just in case you do not need some features, different branches are provided in this project.
31+
32+
| Branch | Description |
33+
|--------|-------------------------------------------------|
34+
| light | Pure react project environment with SCSS loader |
35+
| hmr | React-hot-loader applied |
36+
| router | React-router, server render, code-splitting |
37+
2038
```bash
21-
$ git checkout light
39+
$ git checkout <branch>
2240
```
2341

2442
Then, install the dependencies. It is recommended to use Yarn, (because it is blazing fast). You can still use npm as well.
@@ -31,16 +49,19 @@ $ yarn install # or npm install
3149

3250
You can execute the scripts below by `yarn run <script>` or `npm run <script>`.
3351

34-
| Command | Description |
35-
|---------|---------------------------------------------------------------|
36-
| start | Starts webpack development server; served at `localhost:3000` |
37-
| build | Bundles the source in `~/build` directory |
52+
| Command | Description |
53+
|----------------|---------------------------------------------------------------|
54+
| start | Starts webpack development server; served at `localhost:3000` |
55+
| start:prod | Starts production server; served at `localhost:8080` |
56+
| build | Bundles the source in `~/build` directory |
57+
| build:server | Bundles the source to server renderer in `~/server` directory |
3858

3959
## Directory structure
4060

4161
```
4262
- config # webpack configuration files
4363
- public # directory for index.html
64+
- server # server render
4465
- src # application source code
4566
----- components # directory for presentational components
4667
----- containers # directory for container components

0 commit comments

Comments
 (0)