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
- _addHelpers
- _inlineCode
- _mixExternal
- _parseCode
- _parseCrossLink
- addFoundAt
- augmentData
- compile
- filterFileName
- getProjectMeta
- hasProperty
- makeDirs
- markdown
- mergeExtends
- mixExternal
- nameSort
- NATIVES_LINKER
- populateClasses
- populateFiles
- populateModules
- render
- renderAPIMeta
- renderClass
- renderFile
- renderIndex
- renderModule
- writeAPIMeta
- writeClasses
- writeFiles
- writeIndex
- writeModules
Properties
Methods
_addHelpers
-
helpers
Register a Y.Handlebars
helper method
Parameters:
-
helpers
ObjectObject containing a hash of names and functions
_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:
_mixExternal
()
private
Mixes the various external data soures together into the local data, augmenting it with flags.
_parseCode
-
html
Parses <pre><code>
tags and adds the prettyprint className
to them
Parameters:
-
html
HTMLThe HTML to parse
Returns:
_parseCrossLink
-
item
-
[raw=false]
Parse the item to be cross linked and return an HREF linked to the item
addFoundAt
-
a
Parses file and line number from an item object and build's an HREF
Parameters:
-
a
ObjectThe item 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:
getProjectMeta
()
Object
Prep the meta data to be fed to Selleck
Returns:
hasProperty
-
a
-
b
Checks an array of items (class items) to see if an item is in that list
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:
mergeExtends
-
info
-
classItems
-
first
Merge superclass data into a child class
mixExternal
-
cb
Fetches the remote data and fires the callback when it's all complete
Parameters:
-
cb
CallbackThe callback to execute when complete
nameSort
-
a
-
b
Sort method of array of objects with a property called name
Returns:
NATIVES_LINKER
-
name
Function to link an external type uses NATIVES
object
Parameters:
-
name
StringThe name of the type to link
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.
renderAPIMeta
-
cb
Render the API meta and return the Javascript
Parameters:
-
cb
CallbackThe callback
renderClass
-
cb
-
cv.view
Render the class file
renderFile
-
cb
-
cv.view
Render the source file
renderIndex
-
cb
-
cv.view
Render the index file
renderModule
-
cb
-
cv.view
Render a module
writeAPIMeta
-
cb
Write the API meta data used for the AutoComplete widget
Parameters:
-
cb
CallbackThe callback to execute when complete
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