Plugins
Provides a wrapper around PluginManager for ESComplexModule. Several convenience methods for the plugin callbacks properly manage and or create initial data that are processed by the plugins.
The default plugins loaded include:
Constructor Summary
Public Constructor | ||
public |
constructor(options: object) Initializes Plugins. |
Member Summary
Private Members | ||
private |
_pluginManager: PluginManager Provides a generic plugin manager for dispatching events to module plugins. |
Method Summary
Public Methods | ||
public |
onConfigure(options: object): object Initializes the default |
|
public |
Invokes the |
|
public |
onExitNode(report: ModuleReport, node: object, parent: object) Invokes the |
|
public |
onLoadSyntax(settings: object): object Initializes the trait |
|
public |
onModuleEnd(report: ModuleReport): ModuleReport Invokes the |
|
public |
onModuleStart(ast: object, syntaxes: object, settings: object): ModuleReport Initializes the default |
Public Constructors
public constructor(options: object) source
Initializes Plugins.
Params:
Name | Type | Attribute | Description |
options | object | module options including user plugins to load including:
|
Private Members
private _pluginManager: PluginManager source
Provides a generic plugin manager for dispatching events to module plugins.
Public Methods
public onConfigure(options: object): object source
Initializes the default settings
object hash and then invokes the onConfigure
plugin callback for all loaded
plugins.
Params:
Name | Type | Attribute | Description |
options | object | (Optional) module processing options. |
public onEnterNode(report: ModuleReport, node: object, parent: object): Array<string> | null source
Invokes the onEnterNode
plugin callback during AST traversal when a node is entered.
public onExitNode(report: ModuleReport, node: object, parent: object) source
Invokes the onExitNode
plugin callback during AST traversal when a node is exited.
public onLoadSyntax(settings: object): object source
Initializes the trait syntaxes
object hash and then invokes the onLoadSyntax
plugin callback for all loaded
plugins.
Params:
Name | Type | Attribute | Description |
settings | object | Settings for module processing. |
public onModuleEnd(report: ModuleReport): ModuleReport source
Invokes the onModuleEnd
plugin callback for all loaded plugins such they might finish calculating results.
Params:
Name | Type | Attribute | Description |
report | ModuleReport | The ModuleReport being processed. |
Return:
ModuleReport | The ModuleReport being processed. |