如何将API doc分离为JSDOC中的内部函数doc
How to separate API doc to internal functions doc in JSDOC
我有两个 .js 文件代表一个模块。这个模块将代表一个 API 与其他模块一起使用,所以我想很好地记录这个 API。
这是文件和函数结构:
file1.js
// Include these functions
getCLO(); // Should appear in API doc view
addCLO(); // Should appear in API doc view
prepareCL(); // Should appear in internal module doc view not in API view
file2.js
// Include these functions
getLM(); // Should appear in API doc view
addLM(); // Should appear in API doc view
prepareLM(); // Should appear in internal module doc view not in API view
当我使用 JSDOC 时,我得到了全局部分中的所有函数,这对内部模块文档很有用。 但是如何 select 在 API 视图中记录一些函数以及如何生成它?
您可以使用@private 或 @access 来控制生成哪些函数
我有两个 .js 文件代表一个模块。这个模块将代表一个 API 与其他模块一起使用,所以我想很好地记录这个 API。
这是文件和函数结构:
file1.js
// Include these functions
getCLO(); // Should appear in API doc view
addCLO(); // Should appear in API doc view
prepareCL(); // Should appear in internal module doc view not in API view
file2.js
// Include these functions
getLM(); // Should appear in API doc view
addLM(); // Should appear in API doc view
prepareLM(); // Should appear in internal module doc view not in API view
当我使用 JSDOC 时,我得到了全局部分中的所有函数,这对内部模块文档很有用。 但是如何 select 在 API 视图中记录一些函数以及如何生成它?
您可以使用@private 或 @access 来控制生成哪些函数