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".

Related Posts:

  • Create GUID in JavaScript Case 1: jquery.guid.js var guid = jQuery.Guid.New() but sometimes, it return an error Guid is undefined, etc ... Case 2:  function S4() {     return (((1+Math.random())*0x10000)|0).toStr… Read More
  • Node.jshttp://nodejs.org Cannot find module Error cmd>npm install <name_of_module> ie: ejs, express, formidable Setup App cmd>node server.js… Read More
  • 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 sr… Read More
  • Collections, Objects and Arrays in JavaScript - how to loop through a collection of objects and their properties - how to check whether an object is null or undefined - how to find a particular object with a search in a collection or an array - and so on… It… Read More
  • Joomla - How to easily add Javascript snippets If you're into analyzing the traffic of your Joomla website (as you should be IMHO), you will probably need to add some tracking software to your site. The most obvious one is Google Analytics. Other choices… Read More

0 comments:

Post a Comment