metro/website
Christoph Nakazawa ef9b4b0f0f Metro Website scaffold
Reviewed By: jeanlauliac

Differential Revision: D6396202

fbshipit-source-id: 9bfa3f88fdd747732566a95ded204f8f5206b350
2017-11-22 09:21:33 -08:00
..
blog Metro Website scaffold 2017-11-22 09:21:33 -08:00
core Metro Website scaffold 2017-11-22 09:21:33 -08:00
i18n Metro Website scaffold 2017-11-22 09:21:33 -08:00
pages/en Metro Website scaffold 2017-11-22 09:21:33 -08:00
static Metro Website scaffold 2017-11-22 09:21:33 -08:00
README.md Metro Website scaffold 2017-11-22 09:21:33 -08:00
languages.js Metro Website scaffold 2017-11-22 09:21:33 -08:00
package.json Metro Website scaffold 2017-11-22 09:21:33 -08:00
publish-gh-pages.js Metro Website scaffold 2017-11-22 09:21:33 -08:00
sidebars.json Metro Website scaffold 2017-11-22 09:21:33 -08:00
siteConfig.js Metro Website scaffold 2017-11-22 09:21:33 -08:00

README.md

You will need Node 6 or newer in order to build the Metro website.

Run the server

The first time, get all the dependencies loaded via

yarn

in the root directory.

Then, run the server via

npm start
Open http://localhost:3000

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

Publish the website

The Metro website is hosted as a GitHub page. A static site is generated by server/generate.js and its output is pushed to the gh-pages branch by CircleCI whenever master is updated.

To deploy the website manually, run the following command as a Git user with write permissions:

DEPLOY_USER=facebook GIT_USER=metro-bot CIRCLE_PROJECT_USERNAME=facebook CIRCLE_PROJECT_REPONAME=metro-bundler npm run gh-pages

Staging

Run the above command against your own fork of facebook/metro-bundler:

DEPLOY_USER=YOUR_GITHUB_USERNAME GIT_USER=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_USERNAME=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_REPONAME=metro-bundler npm run gh-pages