Julius Eckert
Julius Eckert

Reputation: 1511

Documentation generator for Google Closure Javascript

I want to generate a HTML-Documentation for my Javascript code. The comments in my code are written in a format, the Google Closure Compiler can use to optimize my code.

Example:

/**
 * Class for handling timing events.
 *
 * @param {number=} opt_interval Number of ms between ticks (Default: 1ms).
 * @param {Object=} opt_timerObject  An object that has setTimeout, setInterval,
 *     clearTimeout and clearInterval (eg Window).
 * @constructor
 * @extends {goog.events.EventTarget}
 */
goog.Timer = function(opt_interval, opt_timerObject) {
...
}

I am looking for something like http://yardoc.org for Javascript.

What tools can you recommend? Are there any specific tools for Google Closure code?

Upvotes: 4

Views: 1777

Answers (2)

Daniel Steigerwald
Daniel Steigerwald

Reputation: 1101

The better is to use last version (3.2.0) https://github.com/jsdoc3/jsdoc It understands almost all Closure annotations. I'm using it for http://estejs.com documentation.

Upvotes: 1

dplass
dplass

Reputation: 1473

That format is called "JsDoc". You can convert from JsDoc-annotated javascript to HTML using http://code.google.com/p/jsdoc-toolkit/

Upvotes: 1

Related Questions