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:
-
html
HTMLThe HTML to parse
Returns:
_parseCode
-
html
Parses <pre><code>
tags and adds the prettyprint className
to them
Parameters:
-
html
HTMLThe 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:
-
o
ObjectThe object to recurse and augment
Returns:
compile
-
cb
Compiles the templates from the meta-data provided by DocParser
Parameters:
-
cb
CallbackThe 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:
-
f
StringThe 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:
-
t
StringThe 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:
-
cb
CallbackThe callback to execute after it's completed
markdown
-
md
-
def
-
tags
Wrapper around the Markdown parser so it can be normalized or even side stepped
Parameters:
Returns:
nameSort
-
a
-
b
Sort method of array of objects with a property called name
Returns:
populateClasses
-
opts
Populate the meta data for classes
Parameters:
-
opts
ObjectThe original options
Returns:
populateFiles
-
opts
Populate the meta data for files
Parameters:
-
opts
ObjectThe original options
Returns:
populateModules
-
opts
Populate the meta data for modules
Parameters:
-
opts
ObjectThe 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:
-
cb
CallbackThe callback to execute after it's completed
writeFiles
-
cb
Generates the syntax files under "out"/files/
Parameters:
-
cb
CallbackThe callback to execute after it's completed
writeIndex
-
cb
Generates the index.html file
Parameters:
-
cb
CallbackThe callback to execute after it's completed
writeModules
-
cb
Generates the module files under "out"/modules/
Parameters:
-
cb
CallbackThe callback to execute after it's completed