node.tmpl

node-module, .\src\tmpl.js

gets the parsed comments and generates the html

Functions
public generate(obj, out)

iterates over the generated object and generates html for each

file and an index file indexitems

Parameter

obj

  • object

the comment-parsed object

out

  • string

the folder to put the documentation to

public index(arr, types)

generates the index-file

render

to adjust HTML see index.jade in the templates folder

Parameter

arr

  • array

the array of files documented

types

  • array

the array of types of documented elements

public items(arr, file, index, types)

generates the markup for each file

render

to adjust HTML see module.jade in the templates folder

Parameter

arr

  • array

the array of all parsed elements in a file

file

  • string

the name of the file, in which the element is

index

  • array

the array of all elements adjusted for index index

types

  • array

an array of all types

public render(tmplName, data, callback)

compiles the data

passes the data to the jade compiler and calls the given callback with the html

Parameter

tmplName

  • string

the name of the template to use

data

  • object

the data to compile

callback

  • function

the function to call with the html

public writeHTML(html, name);

writes html! simple as that

writes the given html to the defined path-name

Parameter

html

  • string

the compiled HTML

name

  • string

the name of the file to write to

Usage
 var tmpl = require('tmpl');