mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Add explanations to sections of README
This commit is contained in:
parent
4d37121a6d
commit
9b7513278f
1 changed files with 16 additions and 2 deletions
18
README.md
18
README.md
|
@ -23,12 +23,22 @@ We’re currently building Scratch using [React](https://facebook.github.io/reac
|
||||||
|
|
||||||
### Before Getting Started
|
### Before Getting Started
|
||||||
* Make sure you have node (v4.2 or higher) and npm [installed](https://docs.npmjs.com/getting-started/installing-node)
|
* Make sure you have node (v4.2 or higher) and npm [installed](https://docs.npmjs.com/getting-started/installing-node)
|
||||||
|
We use npm (Node Package Manager) to maintain and update packages required to build the site.
|
||||||
|
|
||||||
|
### Update Packages
|
||||||
|
When making changes it's important to make sure that all of the node packages are up to date. Some changes in the code are needed because of package updates, so make sure you do this. You can update the packages by running this command:
|
||||||
|
|
||||||
### To Build
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### To Build
|
||||||
|
To build a version of the server on your local machine you can run this command:
|
||||||
|
|
||||||
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
This constructs new files on your machine. If you want the files to only be in memory for testing purposes, consider skipping to the To Run section below.
|
||||||
|
|
||||||
#### Warnings during npm install
|
#### Warnings during npm install
|
||||||
|
|
||||||
|
@ -45,10 +55,14 @@ npm WARN react-dom@0.14.8 requires a peer of react@^0.14.8 but none was installe
|
||||||
These currently exist in static/js/lib
|
These currently exist in static/js/lib
|
||||||
|
|
||||||
### To Run
|
### To Run
|
||||||
|
If you would like to create a temporary version of the site on your machine that you can access through your web browser run the command below. Building (see To Build above) is not necessary for this step and the temporary server can be turned off (see To Stop below).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The site hosted on your local machine can now be accessed by a web browser by entering localhost:8333 into your web browser.
|
||||||
|
|
||||||
During development, `npm start` watches any update you make to files in either `./static` or `./src` and triggers a rebuild of the project. In development, the build is stored in memory, and not served from the `./build` directory.
|
During development, `npm start` watches any update you make to files in either `./static` or `./src` and triggers a rebuild of the project. In development, the build is stored in memory, and not served from the `./build` directory.
|
||||||
|
|
||||||
When running `npm start`, here are some important log messages to keep an eye out for:
|
When running `npm start`, here are some important log messages to keep an eye out for:
|
||||||
|
@ -58,7 +72,7 @@ When running `npm start`, here are some important log messages to keep an eye ou
|
||||||
Once running, open `http://localhost:8333` in your browser. If you wish to have the server reload automatically, you can install either [nodemon](https://github.com/remy/nodemon) or [forever](https://github.com/foreverjs/forever).
|
Once running, open `http://localhost:8333` in your browser. If you wish to have the server reload automatically, you can install either [nodemon](https://github.com/remy/nodemon) or [forever](https://github.com/foreverjs/forever).
|
||||||
|
|
||||||
### To stop
|
### To stop
|
||||||
Use `^C` to stop the node process `npm start` starts.
|
To stop the process that is making the site available to your web browser (created above in To Start) use `^C`.
|
||||||
|
|
||||||
#### Configuration
|
#### Configuration
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue