From caeac61cb9ef1907818ab42969399cca7429d28d Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Tue, 15 Mar 2022 20:37:05 -0700 Subject: [PATCH 1/2] Start docs for --dry --- docs/pages/docs/reference/command-line-reference.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/pages/docs/reference/command-line-reference.mdx b/docs/pages/docs/reference/command-line-reference.mdx index bcb04927e8c8f..2fa4e5abe0c6f 100644 --- a/docs/pages/docs/reference/command-line-reference.mdx +++ b/docs/pages/docs/reference/command-line-reference.mdx @@ -83,6 +83,12 @@ turbo run build --no-deps Let's say you have packages A, B, C, and D where A depends on B and C depends on D. You run `turbo run build` for the first time and everything is built and cached. Then, you change a line of code in B. With the `--deps` flag on, running `turbo run build` will execute `build` in B and then A, but not in C and D because they are not impacted by the change. If you were to run `turbo run build --no-deps` instead, turbo will only run `build` in B. +#### --dry / --dry-run + +Instead of executing tasks, display details about the tasks that would be run. +Task details include the affected packages, commands to be run, log file locations, and more. +Specify `--dry=json` to get the output in JSON format. + #### `--graph` `type: string` From f07a054063ae2ff7cdfaeab15371f8ae902b647e Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Wed, 16 Mar 2022 09:10:44 -0700 Subject: [PATCH 2/2] Enumerate task details included --- .../docs/reference/command-line-reference.mdx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/pages/docs/reference/command-line-reference.mdx b/docs/pages/docs/reference/command-line-reference.mdx index 2fa4e5abe0c6f..5baddc48fb82f 100644 --- a/docs/pages/docs/reference/command-line-reference.mdx +++ b/docs/pages/docs/reference/command-line-reference.mdx @@ -85,10 +85,21 @@ Let's say you have packages A, B, C, and D where A depends on B and C depends on #### --dry / --dry-run -Instead of executing tasks, display details about the tasks that would be run. -Task details include the affected packages, commands to be run, log file locations, and more. +Instead of executing tasks, display details about the affected packages and tasks that would be run. Specify `--dry=json` to get the output in JSON format. +Task details include: + +- `task`: The name of the task to be executed +- `package`: The package in which to run the task +- `hash`: The hash of the task, used for caching +- `directory`: The directory where the task will be run +- `command`: The actual command used to run the task +- `outputs`: Location of outputs from the task that will cached +- `logFile`: Location of the log file for the task run +- `dependencies`: Tasks that must run before this task +- `dependents`: Tasks that must be run after this task + #### `--graph` `type: string`