f4a8efa452
Summary: This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented. Some details: - The iframe is loaded from MaxCDN using rawgit, locked down to a git tag. - Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/` - When viewed on mobile, it falls back to the syntax-highlighted code blocks. The WebPlayer can be inserted into markdown by using the fences: ``` ```ReactNativeWebPlayer import ... AppRegistry.registerComponent ... `` ` ``` ![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png) I didn't actually add the WebPlayer to any docs pages in this PR. That we c Closes https://github.com/facebook/react-native/pull/8328 Differential Revision: D3471527 Pulled By: lacker fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7 |
||
---|---|---|
.. | ||
core | ||
jsdocs | ||
layout | ||
server | ||
src/react-native | ||
.gitignore | ||
README.md | ||
package.json | ||
publish-gh-pages.js | ||
setup.sh |
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