Home Manual Reference Source Test Repository
public class | source

Plugins

Provides a wrapper around PluginManager for ESComplexProject. 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:

See:

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

Initializes the default settings object hash and then invokes the onConfigure plugin callback for all loaded plugins.

public

onProjectEnd(pathModule: object, projectReport: ProjectReport): ProjectReport

Invokes the onProjectEnd plugin callback for all loaded plugins such they might finish calculating project report metrics.

public

onProjectStart(pathModule: object, settings: object)

Initializes the default report object hash and then invokes the onProjectStart plugin callback for all loaded plugins.

Public Constructors

public constructor(options: object) source

Initializes Plugins.

Params:

NameTypeAttributeDescription
options object

module options including user plugins to load including:

(boolean)         loadDefaultPlugins - When false ESComplexProject will not load any default plugins.
(Array<Object>)   plugins - A list of ESComplexProject plugins that have already been instantiated.

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:

NameTypeAttributeDescription
options object

(Optional) project processing options.

Return:

object

public onProjectEnd(pathModule: object, projectReport: ProjectReport): ProjectReport source

Invokes the onProjectEnd plugin callback for all loaded plugins such they might finish calculating project report metrics.

Params:

NameTypeAttributeDescription
pathModule object

Provides an object which matches the Node path module.

projectReport ProjectReport

An instance of ProjectReport.

Return:

ProjectReport

public onProjectStart(pathModule: object, settings: object) source

Initializes the default report object hash and then invokes the onProjectStart plugin callback for all loaded plugins.

Params:

NameTypeAttributeDescription
pathModule object

Provides an object which matches the Node path module.

settings object

Settings for project processing.