Sprockets is the Ruby's method which is used to generate all associated namespaces into one file.
----------------------------------------------1./ Install Ruby and then install Sprockets by this command "$ gem install --remote sprockets" after Ruby.
2./ Write comments in your file as Sprockets' format.
/**
* Dependencies - for Sprockets packaging
**/
//= require
//= require
//= require
//= require
3./ Run command sprocketize with it's options in order to get your binded file.
$ sprocketize method_injector.js > method_injector_spro.js
======================================
JSDoc is a good way to write the project's documentations.
----------------------------------------------1./ Install Java and download JSDoc toolkit into your computer.
2./ Write comments to describe your project as JSDoc's format.
/**
* Class that detects changes of a property on a source object then passes that new value to
a method on a target object
* @constructor
* @extends LL.AbstractNode
* @param {string} targetSetter The name of the method on the target objects
* @param {function} source Constructor of the object whose property we wish to observe
* @param {string} sourceKey The property we wish to observe on the source object
* @property {string} targetSetter The name of the method on the target objects
* @property {function} source Constructor of the object whose property we wish to observe
* @property {string} sourceKey The property we wish to observe on the source object
*/
3./ Run command bellow to generate your documentation as HTML file.
java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode1.js mycode2.js mycode3.js
April 21, 2009
Sprockets & JSDoc
Posted by samneang
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment