import FormatJSONModules from 'typhonjs-escomplex-commons/src/transform/formats/json/FormatJSONModules.js'FormatJSONModules
Provides a format transform for ESComplex ModuleReport / ProjectReport instances converting them to JSON that
includes only the filePath, srcPath, and / or srcPathAlias of module report entries.
Member Summary
| Public Members | ||
| public get |
Gets the file extension. |
|
| public get |
Gets the format name. |
|
| public get |
Gets the format type. |
|
Method Summary
| Public Methods | ||
| public |
formatReport(report: ClassReport | MethodReport | ModuleReport | ProjectReport, options: object): string Formats a report as a JSON string with just module data. |
|
| public |
isSupported(reportType: ReportType): boolean Returns whether a given ReportType is supported by this format transform. |
|
| Private Methods | ||
| private |
_formatModule(moduleReport: ModuleReport): object Formats a module report as a JSON string. |
|
| private |
_formatProject(projectReport: ProjectReport): object Formats a project report modules as a JSON string. |
|
Public Members
Public Methods
public formatReport(report: ClassReport | MethodReport | ModuleReport | ProjectReport, options: object): string source
Formats a report as a JSON string with just module data.
Params:
| Name | Type | Attribute | Description |
| report | ClassReport | MethodReport | ModuleReport | ProjectReport | A report to format. |
|
| options | object | (Optional) One or more optional parameters passed to the formatter. |
public isSupported(reportType: ReportType): boolean source
Returns whether a given ReportType is supported by this format transform.
Params:
| Name | Type | Attribute | Description |
| reportType | ReportType | A given report type. |
Private Methods
private _formatModule(moduleReport: ModuleReport): object source
Formats a module report as a JSON string. Please note that the exported JSON only contains data for ModuleReport instances contained in a ProjectReport.
Params:
| Name | Type | Attribute | Description |
| moduleReport | ModuleReport | A module report. |
private _formatProject(projectReport: ProjectReport): object source
Formats a project report modules as a JSON string.
Params:
| Name | Type | Attribute | Description |
| projectReport | ProjectReport | A project report. |