Class DocBuilder

Build the complete documentation: generate AST from the source files, then extracting doc objects from AST and finally buid HTML pages from the doc objects.

Source : file DocBuilder.js at line 118

Constructor

new DocBuilder ( )

The constructor

Source : file DocBuilder.js at line 193

Public methods

buildFiles ( sourceFilesList )

Build all the docs for the app and then build all the html files

Source : file DocBuilder.js at line 299

Parameters

Name Type Description
sourceFilesList Array of String

The source files names, including relative path since theConfig.srcDir

Private properties

#classDocBuilder : ClassDocBuilder

A ClassDocBuilder object used by the class

Source : file DocBuilder.js at line 139

#classesDocs : Array of ClassDoc

The generated ClassDoc objects

Source : file DocBuilder.js at line 146

#parserOptions : Object

The options for the babel/parser

Source : file DocBuilder.js at line 160

#sourceHtmlBuilder : SourceHtmlBuilder

A SourceHtmlBuilder object used by the class

Source : file DocBuilder.js at line 125

#tagsDataMap : Map of Array of TagData

A Map with all the TagData of all the source files ordered by SourceFileName

Source : file DocBuilder.js at line 187

#variableDocBuilder : VariableDocBuilder

A VariableDocBuilder object used by the class

Source : file DocBuilder.js at line 132

#variablesDocs : Array of VariableDoc

The generated VariableDoc objects

Source : file DocBuilder.js at line 153

Private methods

#buildDocs ( ast, sourceFileName )

Build all the docs for a file

Source : file DocBuilder.js at line 206

Parameters

Name Type Description
ast Object

The root ast node given by the babel/parser

sourceFileName String

The source file name, including relative path since theConfig.srcDir

#traverseAst ( ast, sourceFileName )

Traverse the ast created by the Babel parser and extract the TagData objects for the template literals, string literals, regexp literals and comments

Source : file DocBuilder.js at line 241

Parameters

Name Type Description
ast Object

The root ast node given by the babel/parser

sourceFileName String

The source file name, including relative path since theConfig.srcDir