examples/jsdoc.js function processFile
function processFunction
function processPrototypeMethod
function processComment
function CreateOutputFile
function processJSFile
function GenerateIndex
function PrintOptions

Function processFile

function processFile(f, fname, inputdir, out)
Process a JavaScript source file and process special comments to produce an HTML file of documentation, similar to javadoc.

ParameterDescription
finput file
fnamename of the input file (without the path)
inputdirdirectory of the input file
outoutput file

Author:
Norris Boyd

Version:
1.2 Roland Pennings: Allow multiple files for a function.
1.3 Roland Pennings: Removes ../.. from the input directory name Process JavaScript source file f, writing jsdoc to file out.

Dependencies:
rhinotip.jar

Last modified:



Function processFunction

function processFunction(name, args, comment)
Process function and associated comment.

ParameterDescription
namethe name of the function
argsthe args of the function as a single string
commentthe text of the comment

Returns:
a string for the HTML text of the documentation



Function processPrototypeMethod

function processPrototypeMethod(proto, name, args, comment)
Process a method being bound to a prototype.

ParameterDescription
protothe name of the prototype
namethe name of the function
argsthe args of the function as a single string
commentthe text of the comment

Returns:
a string for the HTML text of the documentation



Function processComment

function processComment(comment,firstLine,fname)
Process comment.

ParameterDescription
commentthe text of the comment
firstLineshows if comment is at the beginning of the file
fnamename of the file (without path)

Returns:
a string for the HTML text of the documentation



Function CreateOutputFile

function CreateOutputFile(outputdir,htmlfile)
Create an html output file

ParameterDescription
outputdirdirectory to put the file
htmlfilename of the file



Function processJSFile

function processJSFile(filename,inputdir)
Process a javascript file. Puts the generated HTML file in the outdir

ParameterDescription
filenamename of the javascript file



Function GenerateIndex

function GenerateIndex(dirname)
Generate index files containing links to the processed javascript files and the generated functions



Function PrintOptions

function PrintOptions()
prints the options for JSDoc