JS包含模式不起作用:"There are no input files to process."


module.exports = {
recurseDepth: 5,
templates: {
default: {
outputSourceFiles: false,
}
},
source: {
includePattern: '.+.js$',
exclude: ['./node_modules'],
},
opts: {
recurse: true,
template: './projects/documentation/template',
destination: './lospec-data/documentation',
//recurse: true
}
};

每次我运行它时;没有要处理的输入文件">

如果我执行source.input: ['test.js'],它只适用于该文件。但它不会在我的文件夹中查找.js文件。

我试着将它设置为.+\.js(doc|x)?$,文档说它将匹配所有.js文件(并且是默认值(,但这也不匹配。我为includePattern尝试了很多不同的东西,但都一无所获。

显然您需要包含"quot;否则什么都不包括。。。

source: {
include: ['.'],

要让jsdoc引用子文件夹,您需要设置;opts";参数。以下示例在jsdocs/:的子文件夹中查找所有js文件

jsdoc.config:

{
"tags": {
"allowUnknownTags": true,
"recurseDepth": 10,
"dictionaries": ["jsdoc", "closure"]
},
"source": {
"include": ["./jsdoc"],
"includePattern": ".+\.js$"
},
"opts": {
"destination": "docs",
"recurse": true,
"readme": "README.md"
},
"sourceType": "module"
}

最新更新