react-native-macos/website
Kevin Lacker 857bae4ea3 Replace the deprecated esprima-fb parser with flow-parser, on the RN website
Summary:
(I changed a ton from when I previously submitted this PR so please take another look if you already did.)

PROBLEM: the no-longer-maintained `esprima-fb` parser does not support class properties, leading our website docgen to die if we use class properties, which we're gonna do real soon now
SOLUTION: use `flow-parser` instead, which the flow team is maintaining including all the fancy-pants ES? stuff that FB uses internally.

This removes the `esprima-fb` parser from jsdocs and replaces it with `flow-parser`. It's almost the same, I checked by diffing all the parser json output and it only had a few irrelevant differences. I had to add a file of constants so that we could remove esprima-fb altogether, too.

This also adds a couple unit tests, so that we can test that jsDocs works programmatically. They don't run if you run the regular RN tests, you have to run `npm test` from the `/website/` subdirectory.
Closes https://github.com/facebook/react-native/pull/9890

Differential Revision: D3865629

Pulled By: bestander

fbshipit-source-id: 8f561b78ca4a02f3f7b45e55904ec2fa911e3bb6
2016-09-14 14:28:44 -07:00
..
core New Post: Unraveling Navigation 2016-09-08 06:59:00 -07:00
jsdocs Replace the deprecated esprima-fb parser with flow-parser, on the RN website 2016-09-14 14:28:44 -07:00
layout Fix broken link in blog page links. 2016-09-05 14:28:45 -07:00
server Replace the deprecated esprima-fb parser with flow-parser, on the RN website 2016-09-14 14:28:44 -07:00
src/react-native Add 手机百度 to the showcase page 2016-09-12 20:43:35 -07:00
.gitignore Introduce blog 2016-03-24 14:11:30 -07:00
README.md Fix instructions so react-native packages are installed first 2016-06-01 17:58:22 -07:00
package.json Replace the deprecated esprima-fb parser with flow-parser, on the RN website 2016-09-14 14:28:44 -07:00
publish-gh-pages.js fixed website deployment condition logic 2016-04-19 06:43:23 -07:00
setup.sh Docs for website setup 2015-12-28 12:47:09 -08:00

README.md

Install prerequisites

Before running the website, make sure you've run the following:

git clone https://github.com/facebook/react-native.git
cd react-native
npm install

Run the website server

The first time, get all the website dependencies loaded via

cd website
npm install

Then, run the server via

npm start
open http://localhost:8079/react-native/index.html

Anytime you change the contents, just refresh the page and it's going to be updated.

Publish the website

cd website
npm run publish-website