Overview
JSD (Javascript Documentor) GLM-JSD is a JavaScript Documentation utility very similar to Java's javadoc and .NET's documentation utilities. It will read in a single .js javascript file and create a series of html documentation files.
 
Tags:

<name>
The name of the object. (Required)

Attributes:
type
The type of object. Supoorted types are object and function. The default type is object. (Optional)

Example:
/// <name>MyString</name>
defines an object.

/// <name type="function">MyFunction</name>
defines a function.


<summary>
The description associated with an object or function. (Optional)

Example:
/// <name>MyString</name>
/// <summary>Class for implmenting custom string methods.</summary>



<param>
Describes function parameters. (Optional)

Attributes:
name
The parameter name. (Required)

Example:
/// <name>MyFunction</name>
/// <param name="param1">The first parameter passed in.</param>
/// <param name="param2">The second parameter passed in.>/param>



<example>
Gives code example for a given object or function. The generated examples are syntax highlighted and formatted as per the xml element. Tabs are kept and line breaks are kept. (Optional)

Example:
/// <name>MyFunction</name>
/// <example>var i = 0;
/// i = MyFunction();</example>

Any linebreaks or tabs that appear after the <example> tag are kept, no html formatting tags are needed.


Command Line Examples:
jsd MySourceFile.js

This creates the documentation files in the current directory.

jsd --output-dir docs MySourceFile.js

This creates the documentation files in the specified "docs" directory.

jsd --title "My JavaScript API" MySourceFile.js

This creates the documentation files with a custom title in the current directory.

jsd --footer "This JavaScript API was created by me." MySourceFile.js

This creates the documentation files with a custom footer in the current directory.

jsd --stylesheet "MyStylesheet.css" MySourceFile.js

This creates the documentation files with a custom stylesheet to use instead of the default one.
 
Online Example
View an online example of the JSD output at http://www.godlikemouse.com/glm-framework .
View an onlin example of a documented JavaScript file at http://www.godlikemouse.com/glm-framework/glm-framework.js .
 
Download
Download the latest version at http://sourceforge.net/projects/glm-jsd/
 
Author
JSD (JavaScript Documentor) was developed by Jason Graves (GodLikeMouse) http://www.godlikemouse.com as is free to use under the GNU General Public License (GPL). See the README file for more details.
 
Support This Project  SourceForge.net Logo