Skip to content

Commit ada6815

Browse files
docs: document new ui configuration options (#7803)
### Description Document new options for the experimental UI + interactive tasks. ### Testing Instructions 👀 Closes TURBO-2680
1 parent 2a7b6c6 commit ada6815

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

docs/pages/repo/docs/reference/configuration.mdx

+33-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to configure Turborepo through `turbo.json`.
55

66
import { Callout } from "../../../../components/Callout";
77
import OutputModeTable from "../../../../components/output-mode-table.mdx";
8-
import Link from 'next/link'
8+
import Link from "next/link";
99

1010
# Configuration Options (`turbo.json`)
1111

@@ -19,8 +19,10 @@ A list of file globs for global hash dependencies. The contents of these files w
1919
This is useful for busting the cache based on `.env` files (not in Git) or any root level file that impacts workspace tasks (but are not represented in the traditional dependency graph (e.g. a root `tsconfig.json`, `jest.config.js`, `.eslintrc`, etc.)).
2020

2121
<Callout type="info">
22-
These must be relative paths from the location of `turbo.json`, and they should be valid for any machine where
23-
this configuration might be used. For instance, it is not a good idea to reference files in one user's home directory.
22+
These must be relative paths from the location of `turbo.json`, and they
23+
should be valid for any machine where this configuration might be used. For
24+
instance, it is not a good idea to reference files in one user's home
25+
directory.
2426
</Callout>
2527

2628
**Example**
@@ -113,6 +115,13 @@ Note: this does _not_ load the files into the environment.
113115
The `extends` key is only valid in Workspace Configurations. It will be
114116
ignored in the root `turbo.json`. Read [the docs to learn more][1].
115117

118+
## `experimentalUI`
119+
120+
`type: bool`
121+
122+
Enable use of the new UI for `turbo`.
123+
Can be overriden by the `TURBO_EXPERIMENTAL_UI` environment variable.
124+
116125
## `pipeline`
117126

118127
An object representing the task dependency graph of your project. `turbo` interprets these conventions to properly schedule, execute, and cache the outputs of tasks in your project.
@@ -151,8 +160,9 @@ Prefixing an item in `dependsOn` with a `^` tells `turbo` that this pipeline tas
151160
Items in `dependsOn` without `^` prefix, express the relationships between tasks at the workspace level (e.g. "a workspace's `test` and `lint` commands depend on `build` being completed first").
152161

153162
<Callout type="info">
154-
As of version 1.5, using `$` to declare environment variables in the `dependsOn` config is
155-
deprecated. <Link href="#env">Use the `env` key instead.</Link>
163+
As of version 1.5, using `$` to declare environment variables in the
164+
`dependsOn` config is deprecated.{" "}
165+
<Link href="#env">Use the `env` key instead.</Link>
156166
</Callout>
157167

158168
**Example**
@@ -199,7 +209,7 @@ Note: this does _not_ load the files into the environment.
199209
"$schema": "https://turbo.build/schema.json",
200210
"pipeline": {
201211
"build": {
202-
"dotEnv": [".env.local", ".env"],
212+
"dotEnv": [".env.local", ".env"]
203213
}
204214
}
205215
}
@@ -271,7 +281,7 @@ in `strict` [env mode][r-cli-env-mode].
271281
"build": {
272282
"passThroughEnv": ["AWS_SECRET_KEY", "GITHUB_TOKEN"]
273283
},
274-
"lint": {},
284+
"lint": {}
275285
}
276286
}
277287
```
@@ -293,7 +303,8 @@ and thus doesn't emit any filesystem artifacts (e.g. like a linter), but you sti
293303
logs (and treat them like an artifact).
294304

295305
<Callout type="info">
296-
`outputs` globs must be specified as relative paths rooted at the workspace directory.
306+
`outputs` globs must be specified as relative paths rooted at the workspace
307+
directory.
297308
</Callout>
298309

299310
**Example**
@@ -365,11 +376,10 @@ changed. This can be helpful if you want to, for example, skip running tests unl
365376
explicitly depend on a `.gitignore`d file.
366377

367378
<Callout type="info">
368-
Good to know:
369-
- The default for `inputs` is `[]` to run the task when any file in the package changes.
370-
- `inputs` globs must be specified as relative paths rooted at the package's directory.
371-
- `turbo.json` is *always* considered an input. If you modify
372-
`turbo.json`, all caches are invalidated.
379+
Good to know: - The default for `inputs` is `[]` to run the task when any file
380+
in the package changes. - `inputs` globs must be specified as relative paths
381+
rooted at the package's directory. - `turbo.json` is *always* considered an
382+
input. If you modify `turbo.json`, all caches are invalidated.
373383
</Callout>
374384
**Example**
375385

@@ -398,7 +408,7 @@ when you want to add or remove additional inputs from the default set.
398408
"pipeline": {
399409
"check-types": {
400410
// Consider all default inputs except the README.md
401-
"inputs": ["$TURBO_DEFAULT$", "!README.md"],
411+
"inputs": ["$TURBO_DEFAULT$", "!README.md"]
402412
}
403413
}
404414
}
@@ -452,6 +462,15 @@ option, `turbo` can warn you about an invalid configuration.
452462
}
453463
```
454464

465+
### `interactive`
466+
467+
`type: boolean`
468+
469+
Mark a task as `interactive` allowing it to receive input from `stdin`.
470+
Interactive tasks must be marked with `"cache": false` as the input they receive from `stdin` can change the outcome of the task.
471+
472+
`turbo` will only run interactive tasks if hooked up to a TTY and the experimental UI is in use.
473+
455474
## Glob specification for paths
456475

457476
Turborepo's glob implementation allows you to specfically define the files you want `turbo` to interact with. The most useful patterns you'll need are in the table below:

docs/pages/repo/docs/reference/system-variables.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ By setting certain environment variables, you can change Turborepo's behavior. T
1313
| `TURBO_BINARY_PATH` | Manually set the path to the `turbo` binary. By default, `turbo` will automatically discover the binary so you should only use this in extremely rare circumstances. |
1414
| `TURBO_CACHE_DIR` | Sets the cache directory, similarly to calling `--cache-dir`-argument |
1515
| `TURBO_CI_VENDOR_ENV_KEY` | Set a prefix for environment variables that you want **excluded** from [Framework Inference](/repo/docs/core-concepts/caching/environment-variable-inputs#framework-inference). |
16+
| `TURBO_EXPERIMENTAL_UI` | Enable experimental UI for `turbo`. Allowed values are `true` and `false`. |
1617
| `TURBO_FORCE` | Always force all tasks in your pipelines to run in full, opting out of all caching. |
1718
| `TURBO_LOG_ORDER` | Set the [log order](https://turbo.build/repo/docs/reference/command-line-reference/run#--log-order) for your pipeline's logs. Allowed values are `grouped` and `default`. |
1819
| `TURBO_LOGIN` | Set the URL used to log in to [Remote Cache](/repo/docs/core-concepts/remote-caching). |

0 commit comments

Comments
 (0)