Skip to content

Commit

Permalink
Merge pull request facebook#5009 from magus/website-docs
Browse files Browse the repository at this point in the history
Docs for website setup
  • Loading branch information
vjeux committed Dec 28, 2015
2 parents 8080583 + dfa541a commit f72cfdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 5 additions & 11 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

The first time, get all the dependencies loaded via

```
```sh
npm install
```

Then, run the server via

```
```sh
npm start
open http://localhost:8079/react-native/index.html
```
Expand All @@ -19,18 +19,12 @@ Anytime you change the contents, just refresh the page and it's going to be upda

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
```sh
./setup.sh
```

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.

```
```sh
./publish.sh
```
4 changes: 3 additions & 1 deletion website/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

# Start in website/ even if run from root directory
cd "$(dirname "$0")"

cd ../../
if [ "$TRAVIS" ]; then
git clone "https://reactjs-bot@github.com/facebook/react-native.git" react-native-gh-pages
Expand All @@ -18,4 +21,3 @@ git checkout origin/gh-pages
git checkout -b gh-pages
git branch --set-upstream-to=origin/gh-pages
cd ../react-native/website

0 comments on commit f72cfdd

Please sign in to comment.