Documentation Generator for Google Closure Javascript

I want to generate HTML documentation for my Javascript code. Comments in my code are written in a format that 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 special tools for Google Closure code?

+4
source share
2 answers

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

+1
source

Better to use the latest version (3.2.0) https://github.com/jsdoc3/jsdoc It understands almost all Closure annotations. I use it for http://estejs.com documentation.

+1
source

Source: https://habr.com/ru/post/1311426/


All Articles