出现错误消息“没有要处理的输入文件".来自jsdoc [英] The error message "There are no input files to process" from jsdoc
问题描述
Jsdoc是本地安装的(npm install jsdoc).我在尝试执行时收到以下错误
.\node_modules.bin\jsdoc --debug ./lib/JavaScriptSource.js
输出:
调试:JSDoc 3.3.0-dev(2014年6月15日,星期日,格林尼治标准时间)
调试:环境信息:{"env":{"conf":{"tags":{"allowUnknownTags":true},"templ
ates:{" monospaceLinks:false," cleverLinks:false," default:{" outputSourceFiles
:true}},源":{"includePattern":.+ \.js(doc)?$","excludePattern":((^ | \/| \\
)_},"插件:[]},"选择:{" _:[" ./lib/JavaScriptSource.js],"调试:true," destina
tion:" ./out/," encoding:" utf8}}}
没有要处理的输入文件.
Jsdoc is installed locally ( npm install jsdoc ). I get the following error while trying to execute
.\node_modules.bin\jsdoc --debug ./lib/JavaScriptSource.js
Output:
DEBUG: JSDoc 3.3.0-dev (Sun, 15 Jun 2014 18:39:52 GMT)
DEBUG: Environment info: {"env":{"conf":{"tags":{"allowUnknownTags":true},"templ
ates":{"monospaceLinks":false,"cleverLinks":false,"default":{"outputSourceFiles"
:true}},"source":{"includePattern":".+\.js(doc)?$","excludePattern":"(^|\/|\\
)_"},"plugins":[]},"opts":{"_":["./lib/JavaScriptSource.js"],"debug":true,"destina
tion":"./out/","encoding":"utf8"}}}
There are no input files to process.
JSDoc 3.3.0-dev (Sun, 15 Jun 2014 18:39:52 GMT)
Options:
-t, --template <value> The path to the template to use. Default:
path/to/jsdoc/templates/default
-c, --configure <value> The path to the configuration file.
Default: path/to/jsdoc/conf.json
.....
</code>
推荐答案
Turns是jsdoc中的一个打开的错误,它不处理以"_"开头的文件路径. github.com/jsdoc3/jsdoc/issues/308.也提供解决方案.
Turns is an open bug in jsdoc where it does not process filepath's starting with "_". github.com/jsdoc3/jsdoc/issues/308. Provides the solution as well.
默认的excludePattern(^ |/| \)_会忽略以下划线开头的路径.
Where the default excludePattern (^|/|\)_ ignores paths starting with an underscore.
https://github.com/jsdoc3/jsdoc/issues/308 引用的解决方案 >
The solution quoted from https://github.com/jsdoc3/jsdoc/issues/308
"要更改默认行为,请执行以下操作:
"To change the default behavior:
将conf.json.EXAMPLE复制到新文件conf.json.你可以把它放在 JSDoc目录或其他目录.如果你把它放在另一个 目录,则需要使用-c选项来告诉JSDoc在哪里 找到它:jsdoc -c path/to/conf.json在文本编辑器中打开conf.json. 找到source.excludePattern属性,并将其更改为空 字符串."
Copy conf.json.EXAMPLE to a new file, conf.json. You can put it in the JSDoc directory or another directory. If you put it in another directory, you will need to use the -c option to tell JSDoc where to find it: jsdoc -c path/to/conf.json Open conf.json in a text editor. Find the source.excludePattern property, and change it to an empty string."
这篇关于出现错误消息“没有要处理的输入文件".来自jsdoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!