Skip to content

@ui5/builder/tasks/replaceCopyright ​

Methods ​

(static) default(options) → {module:@ui5/builder/tasks/runTask~TaskDescriptor}
​

Description: Task to to replace the copyright.

The following placeholders are replaced with corresponding values:

  • ${copyright}
  • @copyright@

If the copyright string contains the optional placeholder ${currentYear} it will be replaced with the current year. If no copyright string is given, no replacement is being done.

A step-based task: the default export is a factory returning one map step with a key per matched resource, so a delta build re-processes only the resources whose content changed. Each step reads the current year through taskUtil.getTime so the incremental build cache tracks it: a cached result re-runs when the calendar year rolls over. Without a TaskUtil (e.g. a direct invocation) the step falls back to the wall clock.

Source: builder/lib/tasks/replaceCopyright.js, line 8

Parameters: ​
NameTypeDescription
optionsobjectOptions
Properties:
NameTypeDescription
copyrightstringReplacement copyright
patternstringPattern to locate the files to be processed
Returns: ​

The task descriptor with its build steps

Type: module:@ui5/builder/tasks/runTask~TaskDescriptor