[英]TypeDoc and how to exclude *.d.ts files only from few paths
我有关于TypeDoc的下一个问题。 所以我有一个像这样的TypeDoc配置:
typedoc: {
build: {
options: {
module: 'commonjs',
out: '../MyDocumentation/',
name: 'MyApp',
target: 'es5',
exclude: '**/*/*.d.ts',
excludePrivate: true,
mode: 'file'
},
src: [
...some sources...
]
}
}
在我的应用程序上有一些带有* .ts文件的路径。 重新编译这些文件后,*。d.ts文件已创建,我想排除它。
因此,对于这个问题的需要,我们将假定我的路径如下所示:
现在,我的TypeDoc配置从整个应用程序中排除了所有* .d.ts文件。
我试图排除* .d.ts文件,但仅从我定义的路径排除,因此我尝试了几种方法来定义排除模式:
exclude: 'Scripts/{FolderA,FolderB,FolderC}/*.d.ts'
但它只是忽略 exclude: '**/*+(FolderA|FolderB|FolderC)/*.d.ts'
但是我的Process terminated with code 3. 'FolderB' is not recognized as an internal or external command, operable program or batch file
exclude: '**/*+(FolderA|FolderB|FolderC)/*.d.ts'
Process terminated with code 3. 'FolderB' is not recognized as an internal or external command, operable program or batch file
错误。 exclude: '**/{FolderA,FolderB,FolderC}/*.d.ts'
但它也忽略了 exclude: [ 'Scripts/FolderA/*.d.ts', 'Scripts/FolderB/*.d.ts', 'Scripts/FolderC/*.d.ts' ]
但它也忽略了...
**/FolderA/*.d.ts
不是忽略,而是如何添加一些路径? 我的某些路径有一个子文件夹,例如。 **/FolderA/ver1/*.d.ts
这就是所有这些,因为我需要将来自node_modules
所有index.d.ts
文件包括到我的文档中。 我需要参考这些库。
也许还有另一种方法怎么做?
我看到了此评论,但不知道为什么-我的typedoc重新编译任务正在忽略该模式。
好的,我自己找到答案...再次!
我需要这样的东西:
exclude: [
'**/FolderA/*.d.ts',
'**/FolderA/ver1/*.d.ts',
'**/FolderB/*.d.ts',
'**/FolderC/*.d.ts'
]
现在我必须设法仅包括来自node_module
index.d.ts
文件:D
这真是小菜一碟-我需要在src
行中添加: 'node_modules/*/index.d.ts'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.