Skip to content

Reusing package selectors

Ruslan Lopatin edited this page Sep 4, 2020 · 1 revision

It is possible to reuse package selectors from any group task in another task:

This can be useful e.g. in root project containing many other ones.

{
  "build": "run-z ...each build",
  "test": "run-z ...each test --batch-parallel",
  "each": "run-z ./r3d-party// ./packages//"
}

This syntax makes it possible to not repeat the same set of package selectors over and over again.

Just place an ellipsis before the name of the task containing selectors. The task should be a group task. This task may, in turn, reuse other selectors.

It is also possible to reuse package selectors from another packages:

{
  "build": "run-z ...each build",
  "test": "run-z ...each test --batch-parallel",
  "each": "run-z ./r3d-party...each ./packages//"
}

Just place an ellipsis between the package selector and a task containing other selectors.

Clone this wiki locally