Targets are used by terminal commands...
$ moon run designSystem:build
And configurations for declaring cross-project or cross-task dependencies.
These scopes are available for both running targets and configuring them.
The most common scope is the project scope, which requires the name of a project, as defined in
.moon/workspace.yml. When paired with a task name, it will run a specific
task from that project.
# Run `lint` in project `app`
$ moon run app:lint
Another way to target projects is with the tag scope, which requires the name of a tag prefixed with
#, and will run a specific task in all projects with that tag.
# Run `lint` in projects with the tag `frontend`
$ moon run '#frontend:lint'
# is a special character in the terminal (is considered a comment), you'll need to wrap
the target in quotes, or escape it like so
These scopes are only available on the command line when running targets.
For situations where you want to run a specific target in all projects, for example
can utilize the all projects scope by omitting the project name from the target:
# Run `lint` in all projects
$ moon run :lint
These scopes are only available when configuring a task.
When you want to include a reference for each project that's depended on,
you can utilize the
^ scope. This will be expanded to all depended on projects. If you do not
want all projects, then you'll need to explicitly define them.
# Configured as
# Resolves to
When referring to another task within the current project, you can utilize the
~ scope, or emit
~: prefix altogether, which will be expanded to the current project's name. This is useful for
situations where the name is unknown, for example, when configuring
.moon/tasks.yml, or if you just want a shortcut!
# Configured as
# Resolves to (assuming project is "foo")