我们的 Storybook 项目中已经包含 TypeDoc,它适用于我们自己的组件。我们还希望为通用 Material 组件生成 TypeDocs。
我已经摆弄了很多--exclude
关于 typedoc 的论点,但不知何故我无法让它工作。
到目前为止,package.json 中的条目如下所示:
"typedoc": "typedoc --mode modules --exclude **/*.spec.ts* --out build/typedoc --json build/typedoc/typedoc.json projects/"
我尝试通过添加--includeDeclarations
到语句并修改--exclude
模式以排除node_modules
除下的所有内容,node_modules/@angular/material
但到目前为止无济于事。例如我尝试了这种模式:
**/{node_modules/!(@angular/material)/**,*.spec.ts}
但我总是收到错误,例如
"/**" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
到目前为止,我从未使用过 minimatch 或 typedoc,因此非常感谢您的帮助。
有任何想法吗?
更新:
我能够通过typedoc.json
在与我的package.json
. typedoc 脚本现在是:
"typedoc --options ./typedoc.json projects/"
内容typedoc.json
是:
{
"out": "build/typedoc",
"json": "build/typedoc/typedoc.json",
"mode": "modules",
"includeDeclarations": true,
"exclude": [
"**/*.spec.ts",
"**/node_modules/!(@angular)/**",
"**/node_modules/@angular/!(material)/**"
]
}
现在的行为与预期的一样。