views:

304

answers:

3

Is there something like dOxygen/Javadoc? What has everyone used out there that has worked well?

+5  A: 

The 800-pound gorilla of Javascript documentation is the JSDoc Toolkit. Check it out here. Most of the documentation is done with Javadoc-like tags and a /** comment prefix.

Example:

var MyClass = Class.create(
  /** @lends MyClass# */              // @lends is how you document anonymous classes.
  {
    /**
     * Description of constructor.
     * @class Description of class.   // @class annotation goes anywhere and
     *                                //   describes the whole class.
     * @constructs                    // This is a constructor.
     */
    initialize: function(arg0, arg1) {
      //...
    },

    /** A method. */
    myFunc: function() {},

    /** An instance field. */
    myVar: 123
  }
);

Object.extend(MyClass,
  /** @lends MyClass */
  {
    /** A class method. */
    classFunc: function() {}
  }
);
John Feminella
+3  A: 

You could also try NaturalDocs. I haven't actually used it myself, but it looks reasonable and supports many other languages as well as JavaScript (the full list of supported languages can be found here).

Steve

Steve Harrison
Natural Docs requires PERL to work
Marco Demajo
A: 

doxygen can do it through filter :

http://www.stack.nl/~dimitri/doxygen/helpers.html

qwer