Files
react-native/docgen
2017-10-31 14:09:41 -07:00
..
2017-08-31 10:38:26 -07:00
2017-10-30 17:04:16 -07:00
2017-08-31 10:38:26 -07:00
2017-08-31 10:38:26 -07:00
WIP
2017-10-31 14:09:41 -07:00
WIP
2017-10-31 14:09:41 -07:00
2017-08-31 10:38:26 -07:00
WIP
2017-10-06 14:30:06 -07:00
WIP
2017-10-31 14:09:41 -07:00
2017-08-31 11:29:32 -07:00
WIP
2017-10-31 14:09:41 -07:00

React Native Docs Generator

The React Native website is generated from a collection of markdown documents. This directory holds a collection of scripts necessary to generate these markdown docs prior to the site being built.

import-existing-docs.js

For development use only. This script will pull down the current docs from master, and apply any transformations necessary to host the docs under the new website build script.

Usage

First, install dependencies:

npm install

Run the following command locally:

GIT_USER=your_git_user GITHUB_USERNAME=facebook GITHUB_REPONAME=react-native node server/import-existing-docs.js 

This will perform a sparse checkout of the docs/ folder from master, generating a clean set of markdown docs in the local docs/ folder. It will also write to disk an updated sidebars.json file based on these docs.

build.js

Runs the usual autodocs generation scripts used by the react-page-middleware variant of the React Native website, but provides markdown instead of HTML. Run this script prior to building the website.

Usage

Run the following command locally:

node server/build.js

The build script performs some cleanup, then runs the following scripts in order:

node server/generate.js
node server/build-autodocs-markdown.js
node server/build-autodocs-sidebar.js