Home Manual Reference Source
public class | source

TargetsFileRules

This service is intended as a helper for plugins or build engines that need to find targets files by creating a set of "rules" for the basic type of files projext manages: JS, SCSS, CSS, fonts, images and favicons.

Constructor Summary

Public Constructor
public

constructor(events: Events, pathUtils: PathUtils, targets: Targets)

Member Summary

Public Members
public

A local reference for the events service.

public

A local reference for the pathUtils service.

public

A local reference for the targets service.

Method Summary

Public Methods
public

Get a set of file rules for an specific target.

Public Constructors

public constructor(events: Events, pathUtils: PathUtils, targets: Targets) source

Params:

NameTypeAttributeDescription
events Events

To send to TargetFileRule and to inform when rules are created.

pathUtils PathUtils

To build the path to the configuration directory, in order to add it on the JS rule.

targets Targets

To get a target information when a set of rules is generated.

Public Members

public events: Events source

A local reference for the events service.

public pathUtils: PathUtils source

A local reference for the pathUtils service.

public targets: Targets source

A local reference for the targets service.

Public Methods

public getRulesForTarget(target: string | Target): TargetFilesRules source

Get a set of file rules for an specific target.

Params:

NameTypeAttributeDescription
target string | Target

The target information or its name.