我可以使用以下命令在整个项目上运行jsdoc:
$ jsdoc -r .
但是这会为node_modules
中的js文件生成文档。我该如何告诉jsdoc不要在.gitignore
中的文件上运行?
我可以使用以下命令在整个项目上运行jsdoc:
$ jsdoc -r .
但是这会为node_modules
中的js文件生成文档。我该如何告诉jsdoc不要在.gitignore
中的文件上运行?
$ jsdoc.js -c ./.jsdoc.conf.json
./.jsdoc.conf.json
{
"source": {
"include": ["."],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "node_modules"
}
}
这里的内容来自在Stack上生成jsdoc文档。
{
"source": {
"include": ["."],
"includePattern": ".(jsx|js|ts|tsx)$",
"exclude": [
"node_modules",
"docs"
]
}
}
["./node_modules"]
放入exclude
参数中并获得相同的结果? - Float07