Working on viz docs
This repository's docs are set up like all of Tidepool's front-end and docs repos. For details on this setup, see the general guidance for docs setup & workflow.
To summarize briefly, the steps you will need to have done in order to use the
npm scripts configured for docs work in the repository are:
- clone a second copy of this repository as a subdirectory
web/; you can do this from your
git clone firstname.lastname@example.org:tidepool-org/viz.git web
- switch to the
gh-pagesbranch in the embedded clone and delete the
$ cd web/ $ git checkout gh-pages $ git branch -d master
We generate Markdown documentation for the utilities in
src/utils/ from the JSDoc comments included with all exports and/or functions. The README in
src/utils/ documents how to regenerate these Markdown files; this regeneration should be performed whenever you've added or updated a utility functon and/or the JSDoc for that utility.
To publish revised docs and/or Storybooks, run the following from the root of the
For updating just docs (including the
src/utils/) by building the static GitBook site that we publish to GitHub Pages:
$ npm run build-docs
cd web/ and review the unstaged changes. Stage & commit the changes you want to make. Finally, "publish" to GitHub pages by pushing to the upstream
For updating the Storybooks (again from the root of
$ npm run build-storybooks
Again navigate into the embedded
web/ directory to review, stage, commit, and push the changes upstream.