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. Parameter | Description |
f | input file |
fname | name of the input file (without the path) |
inputdir | directory of the input file |
out | output 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.
Parameter | Description |
name | the name of the function |
args | the args of the function as a single string |
comment | the 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.
Parameter | Description |
proto | the name of the prototype |
name | the name of the function |
args | the args of the function as a single string |
comment | the text of the comment |
Returns:a string for the HTML text of the documentation
Function processComment
function processComment(comment,firstLine,fname)
Process comment.
Parameter | Description |
comment | the text of the comment |
firstLine | shows if comment is at the beginning of the file |
fname | name 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
Parameter | Description |
outputdir | directory to put the file |
htmlfile | name of the file |
Function processJSFile
function processJSFile(filename,inputdir)
Process a javascript file. Puts the generated HTML file in the outdir
Parameter | Description |
filename | name 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