BuildCopier
Copies the project files and/or the files of a target that doesn't require bundling.
Constructor Summary
| Public Constructor | ||
| public |
constructor(copier: copy, appLogger: Logger, events: Events, pathUtils: PathUtils, projectConfiguration: ProjectConfigurationSettings, targets: Targets) Class constructor. |
|
Member Summary
| Public Members | ||
| public |
A local reference for the |
|
| public |
A local reference for the |
|
| public |
A local reference for the |
|
| public |
A local reference for the |
|
| public |
All the project settings. |
|
| public |
A local reference for the |
|
Method Summary
| Public Methods | ||
| public |
addPrivateModules(packagePath: string, modules: Object, updateModulesToo: boolean): * After the project files are copied, this module updates the copied package.json with local references for any given module name. |
|
| public |
If |
|
| public |
copyTargetFiles(target: Target): Promise<undefined, Error> Copy the files of an specific target. |
|
Public Constructors
public constructor(copier: copy, appLogger: Logger, events: Events, pathUtils: PathUtils, projectConfiguration: ProjectConfigurationSettings, targets: Targets) source
Class constructor.
Params:
| Name | Type | Attribute | Description |
| copier | copy | The function that copies files and directories. |
|
| appLogger | Logger | Used to inform the user when files are being copied. |
|
| events | Events | To trigger events reducer that may alter the items being copied. |
|
| pathUtils | PathUtils | Necessary to build the paths. |
|
| projectConfiguration | ProjectConfigurationSettings | To read the project information and get paths. |
|
| targets | Targets | To get the information of targets
from |
Public Members
Public Methods
public addPrivateModules(packagePath: string, modules: Object, updateModulesToo: boolean): * source
After the project files are copied, this module updates the copied package.json with local references for any given module name.
Params:
| Name | Type | Attribute | Description |
| packagePath | string | The path to the main |
|
| modules | Object | A dictionary with the name of modules as keys and local paths as values. |
|
| updateModulesToo | boolean |
|
If |
Return:
| * | Promise<undefined,Error> |
public copyFiles(): Promise<undefined, Error> source
If copy.enabled is true on the project configuration, this method will copy the list of
items on the configuration copy.items key.
This method emits the event reducer project-files-to-copy with the list of items to copy and
expects an Array on return.
