获取JSON格式的JSDoc输出 [英] Getting JSDoc output in JSON format
本文介绍了获取JSON格式的JSDoc输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过任何方式配置JSDoc,以使输出为JSON格式而不是通常的HMTL格式?
Is there any way to configure JSDoc such that the output is in JSON format instead of the usual HMTL format?
推荐答案
有一个选项"-X"(解释"),该选项使用已解析的AST创建JSON文件.
There is an option "-X" ("explain") which creates a JSON file with parsed AST.
jsdoc -X ./mylib/ > jsdoc-ast.json
To understand this JSON you can use documented schema: https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/schema.js
这篇关于获取JSON格式的JSDoc输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文