This is a JSDoc template created by customizing the template used by Ramda's API documentation.
These are the major changes:
@curried tagaka)$ npm install --save-dev @eluvio/elv-ramdoc
The following are assumed by this template and this README:
v0.0.1)docs/docs)README.md.jsdoc.json (see below for sample)package.json with the following attributes:
nameversionhomepage set to the URL of your project's GitHub pages rootrepository.url set to the URL of your project's GitHub repoNOTE: You should put a link to the API documentation in your README.md file that connects to GitHub pages, e.g.:
## API Documentation
[https://eluv-io.github.io/elv-ramdoc/api.html](https://eluv-io.github.io/elv-ramdoc/api.html)
package.json fragmentNote that homepage is set to project GitHub Pages root, while repository.url points to the GitHub project page.
{
"name": "@eluvio/elv-ramdoc",
"version": "0.0.2",
"homepage": "https://eluv-io.github.io/elv-ramdoc",
"repository": {
"type": "git",
"url": "https://github.com/eluv-io/elv-ramdoc"
}
}
.jsdoc.json fileAssumes the following:
.js files are in src/docs/@private specified{
"tags": {
"allowUnknownTags": ["category","curried","sig"],
"dictionaries": ["jsdoc"]
},
"source": {
"include": ["src"],
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"plugins": [
"plugins/markdown"
],
"opts": {
"destination": "./docs/",
"encoding": "utf8",
"pedantic": true,
"private": true,
"recurse": true,
"template": "node_modules/@eluvio/elv-ramdoc"
}
}
In your projects package.json file add a new script:
"script": {
"generate-docs": "jsdoc --readme README.md --configure .jsdoc.json"
}
Running this task with npm run generate-docs will generate your documentation.
If you would like to print the data being processed, set environment variable ELV_RAMDOC_DEBUG:
"script": {
"generate-docs-debug": "export ELV_RAMDOC_DEBUG=1; jsdoc --readme README.md --configure .jsdoc.json"
}
In order for the GitHub source code links to work properly, you should rebuild and commit the docs with the npm
version lifecycle hook, so that the docs will be rebuilt immediately after version number is bumped in package.json:
"script": {
"version": "npm run generate-docs && git add docs && git commit -m 'Update docs'"
}
https://eluv-io.github.io/elv-ramdoc/api.html
MIT