- This happens in the Turf repository with
/packages/
directory for each module. - To fix the documentation for a module you need to modify the jsdoc for an individual module found in either the
index.js
or theindex.ts
.- eg to update the documentation for
@turf/along
you'd need to modify the jsdoc within/turf/packages/turf-along/index.ts
.
- eg to update the documentation for
- Once you've made your changes you'll need to create a pull request to the Turf repository.
- Note Nothing needs to be changed in the
README.md
for a module.
- Note Nothing needs to be changed in the
- Even once your PR is accepted the docs will still need to be updated manually.
Updating content on http://turfjs.org/
- Clone with
turf-www
repository locally
git clone https://github.com/Turfjs/turf-www.git --recursive
- Important: The
--recursive
flag is important.
- Run
npm install
- Start with updating the turf project dependency:
cd
into theturf-www/turf
submodule and rungit pull origin master
- Run
lerna run build
, this will update thedist/js/index.js
for each module, from which the docs are generated.
cd
back to the root of theturf-www
project- Run
npm run create-config
- Run
npm run generate
- Commit and push the changes
If you would like to have a go at updating the actual website then you'll need to make changes in the turf-www/src
folder. The pages are built using Vue.js and Nuxt.js.
To get a server running with live-reload etc so you can work on the docs run npm run start
.
- http://turfjs.org/ is managed as a static site using Github Pages
- A custom domain for Github Pages in present in
/docs/CNAME
- A custom domain for Github Pages in present in
- The
/src
directory contains the VueJS app- This can be run in a live preview mode using
npm run start
, note that this won't pick up changes to the module documentation.
- This can be run in a live preview mode using
- The API docs are generated from jsdoc markup in each module within the
/turf
submodule- DocumentationJS is used to parse the jsdoc content in each module
- The
npm run create-config
cmd calls the/scripts/create-config.js
file, which generates thesrc/assets/config.json
file which is used by the VueJS to render the docs.
- The
/src
VueJS app, is built into the final deployed docs are built using NuxtJS and are found in the/docs
folder- These are created using the
npm run generate
cmd.
- These are created using the