BuilderContext Class
The Builder Context
Index
Properties
ast
AST
The AST object
options
Option
The command options
helpers
Object
The view helpers function
cacheView
Boolean
cache the views
template
Object
The template
files
Number
records the files
metadata
Object
The project meta
viewExtname
String
The ext name of current view
Methods
addHelper
(
-
name
-
helper
)
-
name -
helper
Add helper
parameters:
-
nameStringThe helper name -
helperFunctionThe helper logic
addHelpers
(
-
helpers
)
-
helpers
Add helpers
parameters:
-
helpersObject
_inlineCode
(
-
html
)
HTML
private
-
html
Ported from Selleck, this handles `'s in fields
that are not parsed by the Markdown parser.
parameters:
-
htmlHTMLThe HTML to parse
returns:
The parsed HTML
_parseCrossLink
(
-
item
-
[raw=false]
-
[content]
)
private
-
item -
[raw=false] -
[content]
Parse the item to be cross linked and return an HREF linked to the item
parameters:
-
itemStringThe item to crossLink -
rawBoolean , : falseDo not wrap it in HTML -
contentStringcrossLink helper content
populateClasses
(
-
opts
)
Object
-
opts
Populate the meta data for classes
parameters:
-
optsObjectThe original options
returns:
The modified options
populateModules
(
-
opts
)
Object
-
opts
Populate the meta data for modules
parameters:
-
optsObjectThe original options
returns:
The modified options
populateFiles
(
-
opts
)
Object
-
opts
Populate the meta data for files
parameters:
-
optsObjectThe original options
returns:
The modified options
addFoundAt
(
-
a
)
String
-
a
Parses file and line number from an item object and build's an HREF
parameters:
-
aObjectThe item to parse
returns:
The parsed HREF
augmentData
(
-
o
)
Object
-
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:
The augmented object
mixExternal
(
-
cb
)
Promise
-
cb
Fetches the remote data and fires the callback when it's all complete
parameters:
-
cbFunctionThe callback to execute when complete
returns:
makeDirs
()
Makes the default directories needed
init
(
-
ast
-
options
)
BuilderContext
-
ast -
options
correctTheme
()
correct the theme
compile
(
-
callback
)
-
callback
Compule the AST
parameters:
-
callbackFunctionThe callback
render
()
Render
NATIVES_LINKER
(
-
name
)
String
private
-
name
Function to link an external type uses NATIVES object
parameters:
-
nameStringThe name of the type to link
returns:
The combined URL
filterFileName
(
-
f
)
String
-
f
Normalizes a file path to a writable filename:
var path = 'lib/file.js'; returns 'lib_file.js';
parameters:
-
fStringThe filename to normalize
returns:
The filtered file path
compile
(
-
ast
-
options
-
onfinish
)
-
ast -
options -
onfinish
compile
parameters:
-
astASTTheASTobject -
optionsOptionThe options -
onfinishFunctionfired when compile has completed