Welcome to YUIDoc 0.2.40!
YUIDoc is a Node.js application that generates API documentation from comments in source, using a syntax similar to tools like Javadoc and Doxygen. YUIDoc provides:
- Live previews. YUIDoc includes a standalone doc server, making it trivial to preview your docs as you write.
- Modern markup. YUIDoc's generated documentation is an attractive, functional web application with real URLs and graceful fallbacks for spiders and other agents that can't run JavaScript.
- Wide language support. YUIDoc was originally designed for
the YUI project, but it is not
tied to any particular library or programming language.
You can use it with any language that supports
/* */
comment blocks.
Installation and Usage
- Download and install Node.js
- Run
npm -g install yuidocjs
. - Run
yuidocjs .
at the top of your JS source tree.
That's it! For more information about running the yuidoc
commandline tool,
refer to "Using YUIDoc".
User Guides
- Command Line Arguments
- External Data
- Modifying the default theme
- The YUIDoc Server
- Using YUIDoc
- YUIDoc Syntax
YUIDoc parses a modified form of JSDoc tags. Here are some example YUIDoc comment blocks with some of the more common tags:
Example YUIDoc Comment Blocks
Here's a taste of some of the more common constructs in YUIDoc. For more information, refer to the "YUIDoc Syntax Reference".
Example Class Block
/** * This is the description for my class. * * @class MyClass * @constructor */
Example Method Block
/** * My method description. Like other pieces of your comment blocks, * this can span multiple lines. * * @method methodName * @param {String} foo Argument 1 * @param {Object} config A config object * @param {String} config.name The name on the config object * @param {Function} config.callback A callback function on the config object * @param {Boolean} [extra=false] Do extra, optional work * @return {Boolean} Returns true on success */
Example Property Block
/** * My property description. Like other pieces of your comment blocks, * this can span multiple lines. * * @property propertyName * @type {Object} * @default "foo" */