import TargetFileRule from 'projext/src/services/targets/targetsFileRules/targetFileRule.js'
TargetFileRule
Helper service used by TargetsFileRules in order to create dynamic file rules for multiple purposes.
Constructor Summary
Public Constructor | ||
public |
constructor(events: Events, targets: Targets, ruleType: string, getSettingsForTargetRule: TargetFileRuleHandler) |
Member Summary
Public Members | ||
public |
A local reference for the |
|
public |
A local reference for the |
Method Summary
Public Methods | ||
public |
Add a target to the rule. |
|
public |
Get the rule settings. |
Public Constructors
public constructor(events: Events, targets: Targets, ruleType: string, getSettingsForTargetRule: TargetFileRuleHandler) source
Params:
Name | Type | Attribute | Description |
events | Events | To reduce the rule settings updated. |
|
targets | Targets | To get the information of other targets
from the |
|
ruleType | string | A reference identifier that tells for which kind file type the rule is being used for. |
|
getSettingsForTargetRule | TargetFileRuleHandler | To define the rule settings whenever a new target is added. |
Throw:
If |
Public Members
Public Methods
public addTarget(target: Target) source
Add a target to the rule. This means the instance will process it and eventually add its
paths to the settings.
This method uses the reducer event target-file-rule
, and if a target was already added,
target-file-rule-update
too. Both events receive the next state of the settings as well
as the current, and expect the final state on return.
Params:
Name | Type | Attribute | Description |
target | Target | The target information. |