ESDoc
API Documentation Generator.
Example:
let config = {source: './src', destination: './esdoc2'};
esdoc2.generate(config, (results, config)=>{
console.log(results);
});
Static Method Summary
Static Public Methods | ||
public static |
generate(config: ESDocConfig): * Generate documentation. |
Static Private Methods | ||
private static |
_checkOldConfig(config: ESDocConfig) check esdoc2 config. |
|
private static |
_generateForIndex(config: ESDocConfig): Tag generate index doc |
|
private static |
_generateForPackageJSON(config: ESDocConfig): Tag generate package doc |
|
private static |
show memory usage stat |
|
private static |
_publish(config: ESDocConfig) publish content |
|
private static |
_resolveDuplication(docs: Tag[]): Tag[] resolve duplication docs |
|
private static |
_setDefaultConfig(config: ESDocConfig) set default config to specified config. |
|
private static |
traverse doc comment in JavaScript file. |
|
private static |
walk recursive in directory. |
Static Public Methods
public static generate(config: ESDocConfig): * source
Generate documentation.
Params:
Name | Type | Attribute | Description |
config | ESDocConfig | config for generation. |
Return:
* |
Static Private Methods
private static _checkOldConfig(config: ESDocConfig) source
check esdoc2 config. and if it is old, exit with warning message.
Params:
Name | Type | Attribute | Description |
config | ESDocConfig | check config |
private static _generateForIndex(config: ESDocConfig): Tag source
generate index doc
Params:
Name | Type | Attribute | Description |
config | ESDocConfig |
private static _generateForPackageJSON(config: ESDocConfig): Tag source
generate package doc
Params:
Name | Type | Attribute | Description |
config | ESDocConfig |
private static _publish(config: ESDocConfig) source
publish content
Params:
Name | Type | Attribute | Description |
config | ESDocConfig |
private static _resolveDuplication(docs: Tag[]): Tag[] source
resolve duplication docs
Params:
Name | Type | Attribute | Description |
docs | Tag[] |
private static _setDefaultConfig(config: ESDocConfig) source
set default config to specified config.
Params:
Name | Type | Attribute | Description |
config | ESDocConfig | specified config. |