Extending
A task can be used as a base template and extended. This is intended to reduce duplicate task definitions.
Extending tasks can save a lot of duplicated tasks in bigger projects and monorepos. With the task extend
property a base configuration can be used as a template.
The following sections and examples use the two predefined tasks in thebuild.tsc.yaml
file.
build.tsc.yaml
Extend a task
Extending the tsc:build
task will use all defined properties as a base. If nothing else is defined, it will be an exact copy with the working directory of the current build file.
.hammerkit.yaml
Override properties in an extend
Every extended task can override defined or undefined properties. In this example the dependency gets cleared and runs without a dependency to the install
task.
.hammerkit.yaml
Last updated