Constructor Summary
Public Constructor | ||
public |
create instance. |
Member Summary
Private Members | ||
private |
_plugins: * |
Method Summary
Public Methods | ||
public |
initialize with plugin property. |
|
public |
handle complete |
|
public |
onHandleAST(ast: AST, filePath: string, code: string): AST handle AST. |
|
public |
onHandleCode(code: string, filePath: string): string handle code. |
|
public |
onHandleCodeParser(parser: function(code: string), parserOption: object, filePath: string, code: string): function(code: string): Object} handle code parser. |
|
public |
onHandleConfig(config: ESDocConfig): ESDocConfig handle config. |
|
public |
onHandleContent(content: string, fileName: string): string handle content. |
|
public |
onHandleDocs(docs: Object[]): Object[] handle docs. |
|
public |
onHandlePlugins(plugins: *) |
|
public |
onPublish(writeFile: function(filePath: string, content: string), copyDir: function(srcPath: string, destPath: string), readFile: function(filePath: string): string) handle publish |
|
public |
onStart() handle start. |
Private Methods | ||
private |
_execHandler(handlerName: string, ev: PluginEvent) exec plugin handler. |
Public Constructors
Private Members
private _plugins: * source
Public Methods
public init(plugins: Array<{name: string, option: object}>){name:> source
initialize with plugin property.
public onHandleCodeParser(parser: function(code: string), parserOption: object, filePath: string, code: string): function(code: string): Object} source
handle code parser.
public onHandleConfig(config: ESDocConfig): ESDocConfig source
handle config.
Params:
Name | Type | Attribute | Description |
config | ESDocConfig | original esdoc2 config. |
public onHandleDocs(docs: Object[]): Object[] source
handle docs.
Params:
Name | Type | Attribute | Description |
docs | Object[] | docs. |
public onHandlePlugins(plugins: *) source
Params:
Name | Type | Attribute | Description |
plugins | * |
public onPublish(writeFile: function(filePath: string, content: string), copyDir: function(srcPath: string, destPath: string), readFile: function(filePath: string): string) source
handle publish
Private Methods
private _execHandler(handlerName: string, ev: PluginEvent) source
exec plugin handler.
Params:
Name | Type | Attribute | Description |
handlerName | string | handler name(e.g. onHandleCode) |
|
ev | PluginEvent | plugin event object. |