Usage
Installation
Install ESDoc and standard-plugin from npm.
cd your-project/
npm install --save-dev esdoc esdoc-standard-plugin
./node_modules/.bin/esdoc -h
Configuration
The minimum configuration is the following JSON. All configurations are here.
.esdoc.json
{
"source": "./src",
"destination": "./docs",
"plugins": [
{"name": "esdoc-standard-plugin"}
]
}
ESDoc automatically finds the configuration file path by the order, if you don't specify -c esdoc.json
.
.esdoc.json
in the current directory.esdoc.js
in the current directoryesdoc
property inpackage.json
Writing Tags
ESDoc supports some documentation tags(aka. jsdoc tags). All tags are here.
/**
* this is MyClass.
*/
export default class MyClass {
/**
* @param {number} a - this is a value.
* @param {number} b - this is a value.
* @return {number} result of the sum value.
*/
sum(a, b){
return a + b;
}
}
And run ESDoc.
./node_modules/.bin/esdoc
open ./docs/index.html