Jsdoc 在本地安装 ( npm install jsdoc )。尝试执行时出现以下错误
.\node_modules.bin\jsdoc --debug ./lib/JavaScriptSource.js
输出:
调试:JSDoc 3.3.0-dev(2014 年 6 月 15 日星期日 18:39:52 GMT)
调试:环境信息:{"env":{"conf":{"tags":{"allowUnknownTags":true},"templ
ates":{"monospaceLinks":false,"cleverLinks":false,"默认":{"outputSourceFiles"
:true}},"source":{"includePattern":".+\.js(doc)?$","excludePattern":"(^|\/|\\
)_"},"plugins":[]},"opts":{"_":["./lib/JavaScriptSource.js"],"debug":true,"destina
化":"./out/","编码":"utf8"}}}
没有要处理的输入文件。
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 中的一个 Unresolved 错误,它不处理以“_”开头的文件路径。 github.com/jsdoc3/jsdoc/issues/308。同时提供解决方案。
默认的 excludePattern (^|/|\)_ 忽略以下划线开头的路径。
方案引用自https://github.com/jsdoc3/jsdoc/issues/308
"To change the default behavior:
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."
关于javascript - 来自 jsdoc 的错误消息 "There are no input files to process",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24412723/