menuBuilder () private documon/src/menuBuilder.js 17
xpath documon.menuBuilder
file documon/src/menuBuilder.js

Takes the source context object (which contains the entire resolved documentation data) and extracts meta data adn refactors / organizes it into an object formatted for "MenuTree.js".

Constructs a multi-dimensional object/array that represents the menu tree ultimately resulting in the output "out/_menuData.js" file, which is formatted for and picked up by the "MenuTree.js" on the index.html page.

Methods
buildSections (ctx, target) private documon/src/menuBuilder.js 43

Checks the provided context to see if an array of items exists for the associated major kind of sections (packages, classes, property, events, methods).

For example, the provided context will take the form of:

    context : {
        classes     : [ a, b, c ]
        properties  : [ a, b, c ]
        etc
    }

If the array exists, we build out that major kind as a section

Builds the context's major sections into the target array (kds)

Parameters
ctx
object

The parsed documentation object.

target
type

The array to put any childeren into.

Returns type

description description

hasAnyPart (item) private documon/src/menuBuilder.js 108

Checks to see if a major type exists.

Parameters
item
type

description

Returns Boolean
render (ctx) documon/src/menuBuilder.js 217

The main entry point for processing. Builds each section on the "root" node if methods and properties are not associated with classes. Meaning that anything avaialble on the root will reside int eh "window" scope. So they just dnagle out there on the tree.

Parameters
ctx
array

description

Returns array

description description

section (ctx, prop) private documon/src/menuBuilder.js 138

Builds an indiviual items containing pertenint meta data required by MenuBuilder to display the item in the tree and click-to-open the associated file.

Parameters
ctx
object

The context to parse. Each level down the tree has it's own unique and seperate context.

prop
string

The key for the part of the context we are going to process.

Returns type

A simplified (meta-only) object that represents the provided context.

Example of returned
{
"id": "packageName.className-propMethodEventEtcName",
"url": "packageName.className.html#propMethodEventEtcName",
"label": "propMethodEventEtcName",
"kind": "propMethodEvent",
"children": [ ] <-- only added when needed
}