esdoc
Good Documentation For JavaScript(ES2015) https://esdoc.org
安装
npm install -g esdoc
使用
Example
├── esdoc.json
└── src/MyClass.js
src/MyClass.js
/**
* this is MyClass.
*/
export default class MyClass {
/**
* @param {number} param this is param.
* @return {number} this is return.
*/
method(param){}
}
esdoc.json
{
"source": "./src",
"destination": "./esdoc"
}
执行
esdoc -c esdoc.json
open ./esdoc/index.html
ES7语法支持
安装
npm install esdoc-es7-plugin
插件配置:
{
"source": "./src",
"destination": "./doc",
"plugins": [
{"name": "esdoc-es7-plugin"}
]
}