Constructor
new TaskUtil(parameters)
- Source:
Since
@ui5/builder.builder.ProjectBuildContext
is a private class, TaskUtil must not be
instantiated by modules other than @ui5/builder itself.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
parameters |
object |
Properties
|
Members
STANDARD_TAGS :module:@ui5/builder.tasks.TaskUtil~StandardBuildTags
- Source:
Type:
Methods
clearTag(resource, tag)
- Source:
Clears the value of a tag stored for the given resource's path.
It's like the tag was never set for that resource.
This method is only available to custom task extensions defining
Specification Version 2.2 and above.
Parameters:
Name | Type | Description |
---|---|---|
resource |
module:@ui5/fs.Resource | The resource the tag should be cleared for |
tag |
string | Tag |
getTag(resource, tag) → {string|boolean|integer|undefined}
- Source:
Retrieves the value for a stored tag. If no value is stored,
undefined
is returned.
This method is only available to custom task extensions defining
Specification Version 2.2 and above.
Parameters:
Name | Type | Description |
---|---|---|
resource |
module:@ui5/fs.Resource | The resource the tag should be retrieved for |
tag |
string | Name of the tag |
Returns:
Tag value for the given resource.
undefined
if no value is available
- Type
- string | boolean | integer | undefined
isRootProject() → {boolean}
- Source:
Check whether the project currently being built is the root project.
This method is only available to custom task extensions defining
Specification Version 2.2 and above.
Returns:
true
if the currently built project is the root project
- Type
- boolean
registerCleanupTask(callback)
- Source:
Register a function that must be executed once the build is finished. This can be used to, for example,
clean up files temporarily created on the file system. If the callback returns a Promise, it will be waited for.
It will also be executed in cases where the build has failed or has been aborted.
This method is only available to custom task extensions defining
Specification Version 2.2 and above.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback to register. If it returns a Promise, it will be waited for |
setTag(resource, tag, valueopt)
- Source:
Stores a tag with value for a given resource's path. Note that the tag is independent of the supplied
resource instance. For two resource instances with the same path, the same tag value is returned.
If the path of a resource is changed, any tag information previously stored for that resource is lost.
This method is only available to custom task extensions defining
Specification Version 2.2 and above.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
resource |
module:@ui5/fs.Resource | The resource the tag should be stored for | ||
tag |
string | Name of the tag. Currently only the STANDARD_TAGS are allowed | ||
value |
string | boolean | integer |
<optional> |
true
|
Tag value. Must be primitive |
Type Definitions
StandardBuildTags
- Source:
Properties:
Name | Type | Description |
---|---|---|
OmitFromBuildResult |
string | Setting this tag to true for a resource will prevent it from being written to the build target |
IsBundle |
string | This tag identifies resources that contain (i.e. bundle) multiple other resources |
Standard Build Tags. See UI5 Tooling
RFC 0008
for details.
Type:
- object