Reputation: 40215
I have been given a JavaScript project to maintain. If it were C or C++ then I would run it through Doxygen and get some decent docs, even if there were no Doxygen comments in the code. This helps give me an overview for the project, before I dive in to serious code exploring.
I can't get Doxygen to generate anything for JS and the links on the official web page are broken.
How to get Doxygen to work with (uncommented) JS code?
Upvotes: 4
Views: 580
Reputation: 52699
shame about the broken links. I found this that will help you, and a SO question about it.
The js2dox perl script basically converts your js code (with the comments) to pseudo-C++ code that is correctly formatted for doxygen to work on. You will have to add some special comment tags to your js to correctly include parameters, return codes and types. These are special tags \tparam, \treturn and \type - they're not valid doxygen tags but will be turned into the correct parts of the C++ code.
The js2dox.pl script can be found in the jsunit build. I'm not sure why it isn't part of the doxygen site!
Upvotes: 2