使用jsdoc生成源碼註釋文檔

It’s always good to write source code document. As it’s said better written than remember nothing.

Recently, I was involved in one js project. And the project contains basic control and app develop framework. So it’s a must to have clearlly wirten APIs.

We choose js doc as the tools.

First, install the tools

sudo npm install git+https://github.com/jsdoc3/jsdoc.git
sudo npm install ink-docstrap

Secondly, setup configuration.json file

Finally, run

jsdoc -c ./configuration.json -t $TemplatePath -d ./docstrap_doc

where $TemplatePath, is node_modules/ink-docstrap/template


After that, you have got bunches of .xml files. And you can put in in some website. They are static web sites.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章