DocBuilder Class
Takes the JSON data from the DocParser class, creates and parses markdown and handlebars
based templates to generate static HTML content
Item Index
Methods
Properties
Methods
_inlineCode
-
html
Ported from Selleck, this handles `'s in fields
that are not parsed by the Markdown parser.
Parameters:
-
htmlHTMLThe HTML to parse
Returns:
_parseCode
-
html
Parses <pre><code> tags and adds the prettyprint className to them
Parameters:
-
htmlHTMLThe HTML to parse
Returns:
augmentData
-
o
Augments the DocParser meta data to provide default values for certain keys as well as parses all descriptions
with the Markdown Parser
Parameters:
-
oObjectThe object to recurse and augment
Returns:
compile
-
cb
Compiles the templates from the meta-data provided by DocParser
Parameters:
-
cbCallbackThe callback to execute after it's completed
filterFileName
-
f
Normalizes a file path to a writable filename:
var path = 'lib/file.js'; returns 'lib_file.js';
Parameters:
-
fStringThe filename to normalize
Returns:
fixType
-
t
Takes a type string and converts it to a "First letter upper cased" type. e.g. (string -> String, object -> Object)
Parameters:
-
tStringThe type string to convert
Returns:
getProjectMeta
()
Object
Prep the meta data to be fed to Selleck
Returns:
makeDirs
-
cb
Makes the default directories needed
Parameters:
-
cbCallbackThe callback to execute after it's completed
nameSort
-
a -
b
Sort method of array of objects with a property called name
Returns:
populateClasses
-
opts
Populate the meta data for classes
Parameters:
-
optsObjectThe original options
Returns:
populateFiles
-
opts
Populate the meta data for files
Parameters:
-
optsObjectThe original options
Returns:
populateModules
-
opts
Populate the meta data for modules
Parameters:
-
optsObjectThe original options
Returns:
render
-
source -
view -
[layout=null] -
[partials={}] -
callback
Ported from Selleck Renders the handlebars templates with the default View class.
renderIndex
-
cb -
cv.view
Render the index file
writeClasses
-
cb
Generates the class files under "out"/classes/
Parameters:
-
cbCallbackThe callback to execute after it's completed
writeFiles
-
cb
Generates the syntax files under "out"/files/
Parameters:
-
cbCallbackThe callback to execute after it's completed
writeIndex
-
cb
Generates the index.html file
Parameters:
-
cbCallbackThe callback to execute after it's completed
writeModules
-
cb
Generates the module files under "out"/modules/
Parameters:
-
cbCallbackThe callback to execute after it's completed
