Skip to content

Building documentation locally

Tyler Butler edited this page Aug 3, 2020 · 9 revisions

Building documentation locally

Generating API documentation

Note: you only need to do this if you want to preview the API documentation (that is, everything in the API section of the docs). Otherwise skip this and go straight to Building documentation site with VuePress, which will be much faster without the API docs.

To build the API documentation, do the following from the root of the repository:

npm install
npm run build:fast -- --symlink:full --install --all
npm run build:fast -- -s build -s build:docs --nolint
npm run build:gendocs

The build:docs script will generate a JSON representation of all the TSDoc comments, and then build:gendocs will convert that to a tree of markdown files, under docs/api/. These files should not be committed to git.

You may run the build and build:docs scripts from a particular package directory, but build:gendocs can only be run from the root.

Building documentation site with VuePress

To build the documentation site, you'll need to switch to the docs/ folder, install the dependencies, and then build the site.

cd docs
npm install
npm start

npm start will serve the local documentation from http://localhost:8080/.

Clone this wiki locally