Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angularjs How to generate HTML code Documentation

Does anyone have any experience in documenting/structuring angularjs projects so the JSDoc can generate nice comments (for your directives, controllers, filters etc.) in an HTML format? At the moment it generates one file with the _global class that points to the namespace of my app with couple functions and that's it...

Or maybe there is a better way to generate html version of doc blocks in angularjs?

PS: I am using standard jsdoc syntax to document my code (@param, @return etc.)

Update: My specific question is: Is there any way to generate html documentation for angularjs doc blocks to cover all controllers/directives/filters etc.? When ran JSDoc command line utility it covered only about 5% of my code in the HTML report...

Thanks!

like image 853
alchemication Avatar asked Oct 11 '12 14:10

alchemication


2 Answers

I have been working on a grunt plugin that utilizes AngularJS's documentation generation code. It follows their syntax and output. grunt-docular. The link shows documentation generation for the docular source as well as the original AngularJS source. It's configurable and extendible.

Go to grunt-docular and find the install link for an example of creating your own documentation

like image 118
John David Five Avatar answered Oct 24 '22 14:10

John David Five


EDIT: See John David Five's answer below

My answer was much, much older and should no longer be accepted.

like image 27
3 revs Avatar answered Oct 24 '22 12:10

3 revs