Tuesday, May 21, 2013

Javascript - Generate Documentation for Javascript



Case 1 - using Javadoc
http://usejsdoc.org/about-commandline.html


cmd>jsdoc src -r -t haruki -c /path/to/my/conf.json -d docs

 
The above will generate documentation for all relevant files found in the src directory, using /path/to/my/conf.json as its configuration file.


The output documentation will use the Haruki template and be in folder docs (relative to the current directory).


Case 2 - Using jsdoc-toolkit

cmd>jsrun.jar app\run.js "C:\PathToSourceFiles" -t=templates\jsdoc -d="C:\PathToOutputDirectory"

Case 3 - Using YUIDoc

Installation and Usage
  1. Download and install Node.js
  2. Run cmd> npm -g install yuidocjs.
  3. Run yuidoc . at the top of your JS source tree.
That's it! For more information about running the yuidoc commandline tool, refer to "Using YUIDoc".

0 comments:

Post a Comment