文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论