最权威的手册就是官网:
https://github.com/senchalabs/jsduck
里面记录的包括在各个环境的部署安装和使用规范。
看到这个警告,心凉了
搭建环境 :win10
第1步:下载windows 安装包
从第1 个红框中 下载包。第2个红框是部署手册。
安装包截图:
部署手册截图:由于我们采用了第一种,所以下面的具体内容可以不看了(那些都是这对第2种的),直接运行生成文档命令。
命令集合:
第2步:写配置文件 jsduck.json
{
"--title": "XXX文档",
"--welcome": "welcome.html",
"--warnings": ["-link", "-no_doc"],
"--seo": true,
"--": [
"./src/canvas"
],
"--output": "./docs",
"--body-html": [
"<script type='text/javascript'>",
"Docs.otherProducts = [",
"{text: 'Docs 3.0', href: 'http://***/3.0'},",
"{text: 'Docs 2.0', href: 'http://***/2.0'},",
"{text: 'Docs 1.0', href: 'http://***/1.0'}",
"];",
"</script>"
]
}
第3步:
.\jsduck.exe --config=d:\jsduck.json