MVC Doc is pure JavaScript so it is easy to modify and make improvements. First, lets show what MVC Doc can document:
You can also specifify the scope of where your functions and attributes are being added with:
Finally, you have directives that provide addtional info about the comment:
/* @constructor
* Person represents a human with a name. Read about the
* animal class [Animal | here].
* @init
* You must pass in a name.
* @params {String} name A person's name
*|
Person = function(name){
this.name = name
Person.count ++;
}
/* @Static *|
MVC.Object.extend(Person, {
/* Number of People *|
count: 0
})
/* @Prototype *|
Person.prototype = {
/* Returns a formal name
* @return {String} the name with "Mrs." added
*|
fancy_name : function(){
return "Mrs. "+this.name;
}
} There are a few things to notice:
js apps/app_name/compress.jsThe docs will be put in your docs folder.
//loads doc source
load('jmvc/rhino/documentation/setup.js');
//pass file locations, and a name to a new Doc.Application
new MVC.Doc.Application(['file1.js','folder/file2.js'], "MyApp");
link(content) -> undefined
{Object} -
link_content(content) -> undefined
{String} - Any text, usually a commment.
A map of the full name of all the objects the application creates and the url to the documentation for them.