【发布时间】:2018-08-13 14:43:55
【问题描述】:
我必须使用 TypeDoc 来准备我的项目文档。
在我的项目中,我有一些包含 TS 文件的文件夹(彼此不相关),例如。文件夹 A、文件夹 B 等
当我想要一个或多个文件夹中的一个文档时,我非常简单,但我很难为每个文件夹生成单独的文档。
对于一个文件夹,我的配置文件如下所示:
typedoc: {
build: {
options: {
module: 'commonjs',
out: '../Documentation/A',
name: 'Documentation for A folder',
target: 'es5',
exclude: '**/*.d.ts',
excludePrivate: true,
mode: 'file'
},
src: [
'js/A/*.ts'
]
}
}
如果我想为我的每个文件夹分开文档,我不知道应该如何构建这个配置。
我尝试了类似的构建数组(但没有成功):
typedoc: {
build: [{
options: {
module: 'commonjs',
out: '../Documentation/A',
name: 'Documentation for A folder',
target: 'es5',
exclude: '**/*.d.ts',
excludePrivate: true,
mode: 'file'
},
src: [
'js/A/*.ts'
]
},
{
options: {
module: 'commonjs',
out: '../Documentation/B',
name: 'Documentation for B folder',
target: 'es5',
exclude: '**/*.d.ts',
excludePrivate: true,
mode: 'file'
},
src: [
'js/B/*.ts'
]
}]
}
有什么想法吗?
【问题讨论】:
标签: typescript gruntjs documentation typedoc