2015-03-26 17:14:24 +00:00
|
|
|
# Run the website server
|
2015-02-12 04:26:43 +00:00
|
|
|
|
|
|
|
The first time, get all the dependencies loaded via
|
|
|
|
|
|
|
|
```
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
|
|
|
Then, run the server via
|
|
|
|
|
|
|
|
```
|
|
|
|
npm start
|
2015-10-28 00:48:02 +00:00
|
|
|
open http://localhost:8080/react-native/index.html
|
2015-02-12 04:26:43 +00:00
|
|
|
```
|
|
|
|
|
2015-03-26 17:14:24 +00:00
|
|
|
Anytime you change the contents, just refresh the page and it's going to be updated.
|
2015-02-12 04:26:43 +00:00
|
|
|
|
|
|
|
# Publish the website
|
|
|
|
|
|
|
|
First setup your environment by having two folders, one `react-native` and one `react-native-gh-pages`. The publish script expects those exact names.
|
|
|
|
|
|
|
|
```
|
|
|
|
cd ../../
|
|
|
|
git clone git@github.com:facebook/react-native.git react-native-gh-pages
|
|
|
|
cd react-native-gh-pages
|
|
|
|
git checkout origin/gh-pages
|
|
|
|
git checkout -b gh-pages
|
|
|
|
git push --set-upstream origin gh-pages
|
|
|
|
cd ../react-native/website
|
|
|
|
```
|
|
|
|
|
|
|
|
Then, after you've done changes, just run the command and it'll automatically build the static version of the site and publish it to gh-pages.
|
|
|
|
|
|
|
|
```
|
|
|
|
./publish.sh
|
|
|
|
```
|