views:

411

answers:

5

Hi, I have some JavaScript to document and am not sure which tool is best to use - ideally I would like to publish the docs online but also have an offline browsable version. I know there are more tools about than jsdoc nowadays - any experiences of different doc tools for JavaScript would be useful. If it has a maven plugin that would be a bonus but not required.

+4  A: 

Natural Docs is one option that can produce nicely formatted HTML documentation (example output), with at least basic support for JavaScript. Someone's also written a doxygen helper script to use that with JavaScript as well.

Amber
Natural Docs requires PERL to work.
Marco Demajo
+2  A: 

JsDoc-Toolkit is also worth a look: http://code.google.com/p/jsdoc-toolkit/

Residuum
+4  A: 
Sam Hasler
Its quite ugly and doesn't work in Internet Explorer - no good for me.
DLauer
Looks the same in IE8 and Firefox here.
Sam Hasler
A: 

Slightly off topic for this, but related enough I feel to warrant an answer.

The vsdoc convention is useful for getting intellisense in Visual Studio.

The folllowing link is probably a good place to start:

http://blogs.msdn.com/webdevtools/archive/2008/11/07/hotfix-to-enable-vsdoc-js-intellisense-doc-files-is-now-available.aspx

James Wiseman
+4  A: 

I found some of my own after some research:

  • JSDoc - the original Javadoc-style tool
  • JSDoc Toolkit - a re-write by the original JSDoc author
  • YUI Doc - the doc generation tool used by the YUI team
  • Ext Doc - generates Ext-style API documentation

There is also a Maven JSTools Plugin that supports JSDoc Toolkit.

DLauer
JSDoc requires PERL to work; YUI Doc requires PHYTON to work; Ext Doc creates heavy Ext-style documentation (not simpe, HTML/CSS documentation); JSDoc Toolkit works with JAVA;
Marco Demajo