Skip to main content

run

The moon run (or moon r) command will run one or many targets (a task within a project) and all of its dependencies in topological order. Each run will incrementally cache each task, improving speed and development times... over time.

# Run `lint` in project `app`
$ moon run app:lint

# Run `lint` in project `app` and `server`
$ moon run app:lint server:lint

# Run `lint` in all projects
$ moon run :lint

View the official Run a task article for more information!

Arguments

Options

  • --dependents - Run downstream dependent targets (of the same task name) as well.
  • --profile <type> - Record and generate a profile for ran tasks.
    • Types: cpu, heap
  • --report - Generate a report of the ran actions. Report is written to .moon/cache/runReport.json.

Affected

  • --affected - Only run target if affected by changed files, otherwise will always run.
  • --status <type> - Filter affected based on a change status.
    • Types: all (default), added, deleted, modified, staged, unstaged, untracked
  • --upstream - Determine affected against upstream by comparing HEAD against a base revision (default branch), otherwise uses local changes.