Jsdocx - 文檔自動化生成工具

jopen 13年前發布 | 42K 次閱讀 程序文檔工具 JavaScript

這是一款用java寫的文檔生成工具。可以自動掃描JS源代碼,抽取所有類的方法與屬性生成完整的項目API文檔。

示例代碼生成的HTML文檔可以看這里: http://jsdocx.sourceforge.net/example/sanguo/js/jsdocx/index.html
Jsdocx的項目首頁: http://jsdocx.sourceforge.net/
Jsdocx的注釋規范文檔: http://jsdocx.sourceforge.net/Jsdocx_Annotation_Specification.html

你可以下載jar。
在命令行中執行:
java -cp org.dragonfly.jsdocx-<version>.jar org.dragonfly.jsdocx.JsdocCreator -Souredir=<js source's directory>

Arguments:
-Charset=<charset>: the generating html document's charset
-Souredir=<directoryPath>: the javascript source's directory
-Docdir=<directoryPath>: the generating html document's directory
-Clean: clean the html document's directory before generating

或者在Java代碼中執行:
JsdocConfig config = new JsdocConfig();
config.setSourceDir("the javascript source's directory");
new JsdocCreator(config).generate();

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!