API Docs for: 0.1.0

Class DocBuilder

Class defined in: lib/builder.js:9

Takes the JSON data from the DocParser class, creates and parses markdown and handlebars based templates to generate static HTML content

HTML _inlineCode ( html ) /* private method */
lib/builder.js:440

Ported from Selleck, this handles `'s in fields that are not parsed by the Markdown parser.

Parameters:
  • html <HTML> The HTML to parse

Returns: <HTML> The parsed HTML
HTML _parseCode ( html ) /* private method */
lib/builder.js:429

Parses <pre><code> tags and adds the prettyprint className to them

Parameters:
  • html <HTML> The HTML to parse

Returns: <HTML> The parsed HTML
Object augmentData ( o )
lib/builder.js:348

Augments the DocParser meta data to provide default values for certain keys as well as parses all descriptions with the Markdown Parser

Parameters:
  • o <Object> The object to recurse and augment

Returns: <Object> The augmented object
compile ( cb )
lib/builder.js:897

Compiles the templates from the meta-data provided by DocParser

Parameters:
  • cb <Callback> The callback to execute after it's completed
String filterFileName ( f )
lib/builder.js:884

Normalizes a file path to a writable filename:

 var path = 'lib/file.js';
 returns 'lib_file.js';
Parameters:
  • f <String> The filename to normalize

Returns: <String> The filtered file path
Object getProjectMeta ( )
lib/builder.js:239

Prep the meta data to be fed to Selleck


Returns: <Object> The project metadata
makeDirs ( cb )
lib/builder.js:405

Makes the default directories needed

Parameters:
  • cb <Callback> The callback to execute after it's completed
Number nameSort ( a, b )
lib/builder.js:815

Sort method of array of objects with a property called name

Parameters:
  • a <Object> First object to compare
  • b <Object> Second object to compare

Returns: <Number> 1, -1 or 0 for sorting.
Object populateClasses ( opts )
lib/builder.js:257

Populate the meta data for classes

Parameters:
  • opts <Object> The original options

Returns: <Object> The modified options
Object populateFiles ( opts )
lib/builder.js:294

Populate the meta data for files

Parameters:
  • opts <Object> The original options

Returns: <Object> The modified options
Object populateModules ( opts )
lib/builder.js:271

Populate the meta data for modules

Parameters:
  • opts <Object> The original options

Returns: <Object> The modified options
render ( source, view, [layout=null], [partials={}], callback )
lib/builder.js:459

Ported from Selleck Renders the handlebars templates with the default View class.

Parameters:
  • source <HTML> The default template to parse
  • view <Class> The default view handler
  • [layout=null] <HTML> The HTML from the layout to use.
  • [partials={}] <Object> List of partials to include in this template
  • callback <Callback>
    • err <Error>
    • html <HTML> The assembled template markup
writeClasses ( cb )
lib/builder.js:642

Generates the class files under "out"/classes/

Parameters:
  • cb <Callback> The callback to execute after it's completed
writeFiles ( cb )
lib/builder.js:838

Generates the syntax files under "out"/files/

Parameters:
  • cb <Callback> The callback to execute after it's completed
writeIndex ( cb )
lib/builder.js:509

Generates the index.html file

Parameters:
  • cb <Callback> The callback to execute after it's completed
writeModules ( cb )
lib/builder.js:535

Generates the module files under "out"/modules/

Parameters:
  • cb <Callback> The callback to execute after it's completed
defaultTags <String>
lib/builder.js:227

The default tags to use in params descriptions (for Markdown).

files <Number>
lib/builder.js:233

File counter