DocBuilder
Direct Subclass:
Builder base class.
Constructor Summary
Public Constructor | ||
public |
constructor(data: Taffy, config: ESDocConfig) create instance. |
Method Summary
Public Methods | ||
public abstract |
execute building output. |
Private Methods | ||
private |
_buildCoverageHTML(coverageObj: CoverageObject): string this method was deprecated.
build coverage html. |
|
private |
_buildDeprecatedHTML(doc: DocObject): string build deprecated html. |
|
private |
_buildDetailDocs(docs: DocObject[], title: string): IceCap build detail output html by docs. |
|
private |
build detail output html by parent doc. |
|
private |
build html link to identifier. |
|
private |
build html links to identifiers |
|
private |
build experimental html. |
|
private |
_buildFileDocLinkHTML(doc: DocObject, text: string): string build html link to file page. |
|
private |
build common layout output. |
|
private |
build common navigation output. |
|
private |
_buildOverrideMethod(doc: DocObject): string build method of ancestor class link html. |
|
private |
_buildProperties(properties: ParsedParam[], title: string): IceCap build properties output. |
|
private |
_buildSignatureHTML(doc: DocObject): string build identifier signature html. |
|
private |
_buildSummaryDoc(docs: DocObject[], title: string, innerLink: boolean): IceCap build summary output html by docs. |
|
private |
build summary output html by parent doc. |
|
private |
_buildTypeDocLinkHTML(typeName: string): string build html link of type. |
|
private |
find doc object. |
|
private |
_findAccessDocs(doc: DocObject, kind: string, isStatic: boolean): Array[] find doc object for each access. |
|
private |
_findAllIdentifiersKindGrouping(): {class: DocObject[], interface: DocObject[], function: DocObject[], variable: DocObject[], typedef: DocObject[], external: DocObject[]} find all identifiers with kind grouping. |
|
private |
_findByName(name: string, kind: string): DocObject[] fuzzy find doc object by name. |
|
private |
_getBaseUrl(fileName: string): string get base url html page. |
|
private |
get target's essential info. |
|
private |
_getOutputFileName(doc: DocObject): string get file name of output html page. |
|
private |
get output html page title. |
|
private |
gat url of output html page. |
|
private |
_orderedFind(order: string, cond: ...Object): DocObject[] find doc objects that is ordered. |
|
private |
_readTemplate(fileName: string): string read html template. |
Public Constructors
public constructor(data: Taffy, config: ESDocConfig) source
create instance.
Params:
Name | Type | Attribute | Description |
data | Taffy | doc object database. |
|
config | ESDocConfig | esdoc config is used build output. |
Public Methods
public abstract exec(callback: function) source
execute building output.
Params:
Name | Type | Attribute | Description |
callback | function | is called with some data. |
Private Methods
private _buildCoverageHTML(coverageObj: CoverageObject): string source
build coverage html.
Params:
Name | Type | Attribute | Description |
coverageObj | CoverageObject | target coverage object. |
private _buildDeprecatedHTML(doc: DocObject): string source
build deprecated html.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |
private _buildDetailDocs(docs: DocObject[], title: string): IceCap source
build detail output html by docs.
private _buildDetailHTML(doc: DocObject, kind: string, title: string, isStatic: boolean): string source
build detail output html by parent doc.
private _buildDocLinkHTML(longname: string, text: string, inner: boolean, kind: string): string source
build html link to identifier.
private _buildDocsLinkHTML(longnames: string[], text: string, inner: boolean, separator: string): string source
build html links to identifiers
private _buildExperimentalHTML(doc: DocObject): string source
build experimental html.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |
private _buildFileDocLinkHTML(doc: DocObject, text: string): string source
build html link to file page.
private _buildOverrideMethod(doc: DocObject): string source
build method of ancestor class link html.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |
private _buildProperties(properties: ParsedParam[], title: string): IceCap source
build properties output.
Params:
Name | Type | Attribute | Description |
properties | ParsedParam[] |
|
properties in doc object. |
title | string | output title. |
private _buildSignatureHTML(doc: DocObject): string source
build identifier signature html.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |
private _buildSummaryDoc(docs: DocObject[], title: string, innerLink: boolean): IceCap source
build summary output html by docs.
private _buildSummaryHTML(doc: DocObject, kind: string, title: string, isStatic: boolean): string source
build summary output html by parent doc.
private _buildTypeDocLinkHTML(typeName: string): string source
build html link of type.
Params:
Name | Type | Attribute | Description |
typeName | string | type name(e.g. |
TODO:
- re-implement with parser combinator.
private _find(cond: ...Object): DocObject[] source
find doc object.
Params:
Name | Type | Attribute | Description |
cond | ...Object | find condition. |
private _findAccessDocs(doc: DocObject, kind: string, isStatic: boolean): Array[] source
find doc object for each access.
private _findAllIdentifiersKindGrouping(): {class: DocObject[], interface: DocObject[], function: DocObject[], variable: DocObject[], typedef: DocObject[], external: DocObject[]} source
find all identifiers with kind grouping.
private _findByName(name: string, kind: string): DocObject[] source
fuzzy find doc object by name.
- equal with longname
- equal with name
- include in longname
- include in ancestor
private _getBaseUrl(fileName: string): string source
get base url html page. it is used html base tag.
Params:
Name | Type | Attribute | Description |
fileName | string | output file path. |
private _getInfo(): {title: string, version: string, url: string} source
get target's essential info.
private _getOutputFileName(doc: DocObject): string source
get file name of output html page.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |
private _getTitle(doc: DocObject): string source
get output html page title. use title
in undefined.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |
private _getURL(doc: DocObject): string source
gat url of output html page.
Params:
Name | Type | Attribute | Description |
doc | DocObject | target doc object. |