Skip to content

Commit 77a53db

Browse files
committed
Add build doc & doc clean.
1 parent 9512e8b commit 77a53db

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ JavaScript library boilerplate, a web project template using:
2323

2424
* Follow the [getting started guide](./docs/getting-started.md) to download and run the project
2525

26+
### Build Project
27+
* Follow [Build Doc](./docs/build.md) to build the project.
28+
2629
### Directory Layout
2730

2831
```

docs/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+
### cd to Foo.
5+
6+
### Run `npm run prod`
7+
The command will generate all static files into build folder.
8+
9+
### You can test the build by run 'npm run start:prod'
10+
The command will bring up a node server which servers all static files under build foler. Visit [http://localhost:5000](http://localhost:5000). If it works well, you'll see the page runs up.
11+
12+
### Deploy. Put the files under build folder into your web server.

docs/getting-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ This will install both run-time project dependencies and developer tools listed
2424
in [package.json](./package.json) file.
2525

2626
#### 3. Run `npm start`
27-
This command will build the app from the source files (/src) into the output /build folder. As soon as the initial build completes, it will start the Node.js server (node src/server.js).
28-
> [http://localhost:3334/](http://localhost:3334/)Node.js server (`src/server.js`)<br>
27+
This command will build the app into webpack bundles. As soon as the build completes, it will start a webpack dev server.
28+
> [http://localhost:3334/](http://localhost:3334/)Webpack dev server

0 commit comments

Comments
 (0)