import ESComplexProject from 'typhonjs-escomplex-project/src/ESComplexProject.js'
ESComplexProject
Provides a runtime to invoke ESComplexProject plugins for processing / metrics calculations of projects.
Constructor Summary
Public Constructor | ||
public |
constructor(pathModule: object, options: object) Initializes ESComplexProject. |
Member Summary
Private Members | ||
private |
_escomplexModule: ESComplexModule Stores the ESComplexModule instance used for generating module reports. |
|
private |
Stores a module which matches the NodeJS path module API. |
|
private |
Provides dispatch methods to all module plugins. |
Method Summary
Public Methods | ||
public |
Processes the given modules and calculates project metrics via plugins. |
|
public |
analyzeAsync(modules: Array<object>, options: object): Promise<ProjectReport> Wraps in a Promise processing the given modules and calculates metrics via plugins. |
|
public |
Processes an existing ProjectReport instance and calculates metrics via plugins. |
|
public |
processAsync(projectReport: ProjectReport, options: object): Promise<ProjectReport> Wraps in a Promise processing of existing ProjectReport instance and calculates metrics via plugins. |
Public Constructors
public constructor(pathModule: object, options: object) source
Initializes ESComplexProject.
Params:
Name | Type | Attribute | Description |
pathModule | object | Provides an object which matches the Node path module. In particular the following entries must be provided:
|
|
options | object | module and project options including user plugins to load including:
|
Private Members
private _escomplexModule: ESComplexModule source
Stores the ESComplexModule instance used for generating module reports.
Public Methods
public analyze(modules: Array<object>, options: object): ProjectReport source
Processes the given modules and calculates project metrics via plugins.
Return:
ProjectReport |
public analyzeAsync(modules: Array<object>, options: object): Promise<ProjectReport> source
Wraps in a Promise processing the given modules and calculates metrics via plugins.
public process(projectReport: ProjectReport, options: object): ProjectReport source
Processes an existing ProjectReport instance and calculates metrics via plugins.
Params:
Name | Type | Attribute | Description |
projectReport | ProjectReport | An instance of ProjectReport with a |
|
options | object | (Optional) project processing options. |
Return:
ProjectReport |
public processAsync(projectReport: ProjectReport, options: object): Promise<ProjectReport> source
Wraps in a Promise processing of existing ProjectReport instance and calculates metrics via plugins.
Params:
Name | Type | Attribute | Description |
projectReport | ProjectReport | An instance of ProjectReport. |
|
options | object | (Optional) project processing options. |