Home Manual Reference Source
public class | source

BuildCleaner

Remove the builded files for the project and/or an specific target.

Constructor Summary

Public Constructor
public

constructor(appLogger: Logger, cleaner: clean, pathUtils: PathUtils, projectConfiguration: ProjectConfigurationSettings, utils: Utils)

Class constructor.

Member Summary

Public Members
public

A local reference for the appLogger service.

public

A local reference for the cleaner service function.

public

A local reference for the pathUtils service.

public

All the project settings.

public

A local reference for the utils service.

Method Summary

Public Methods
public

Removes the entire distribution directory (where are the targets build are located).

public

Removes the builded files of an specific target.

Public Constructors

public constructor(appLogger: Logger, cleaner: clean, pathUtils: PathUtils, projectConfiguration: ProjectConfigurationSettings, utils: Utils) source

Class constructor.

Params:

NameTypeAttributeDescription
appLogger Logger

Used to inform the user when files haven been removed of it there was a problem removing them.

cleaner clean

The function that removes directories and files using glob patterns.

pathUtils PathUtils

Necessary to build the paths to clean.

projectConfiguration ProjectConfigurationSettings

To read the project information and get paths.

utils Utils

To replace plaholders on the targets paths.

Public Members

public appLogger: Logger source

A local reference for the appLogger service.

public cleaner: clean source

A local reference for the cleaner service function.

public pathUtils: PathUtils source

A local reference for the pathUtils service.

public projectConfiguration: ProjectConfigurationSettings source

All the project settings.

public utils: Utils source

A local reference for the utils service.

Public Methods

public cleanAll(): Promise<undefined, Error> source

Removes the entire distribution directory (where are the targets build are located).

Return:

Promise<undefined, Error>

public cleanTarget(target: Target): Promise<undefined, Error> source

Removes the builded files of an specific target.

Params:

NameTypeAttributeDescription
target Target

The target information.

Return:

Promise<undefined, Error>