Skip to content

Commit

Permalink
documents new config values
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitropoulos committed Aug 16, 2024
1 parent 219c114 commit 988bdbe
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 8 deletions.
41 changes: 41 additions & 0 deletions docs/repo-docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,47 @@ To help with incremental migration or in situations where you can't use the `pac
environment variable.
</Callout>

### `cacheDir`

Default: `".turbo/cache"`

Specify the filesystem cache directory.

```jsonc title="./turbo.json"
{
"cacheDir": ".turbo/cache"
}
```

### `daemon`

Default: `false`

Turbo can run a background process to pre-calculate values used for determining work that needs to be done. This standalone process (daemon) is an optimization, and not required for proper functioning of turbo.

```jsonc title="./turbo.json"
{
"daemon": true
}
```

### `envMode`

Default: `"strict"`

Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:

- `"strict"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.
- `"loose"`: Allow all environment variables for the process to be available.

Read more about [Environment Modes](/repo/docs/crafting-your-repository/using-environment-variables#environment-modes).

```jsonc title="./turbo.json"
{
"envMode": "strict"
}
```

## Defining tasks

### `tasks`
Expand Down
12 changes: 8 additions & 4 deletions docs/repo-docs/reference/run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ turbo run build --cache-dir="./my-cache"
Ensure the directory is in your `.gitignore` when changing it.
</Callout>
The same behavior can also be set via the `TURBO_CACHE_DIR=example/path` system variable.
### `--concurrency <number | percentage>`
Default: `10`
Expand Down Expand Up @@ -137,6 +139,8 @@ Controls the available environment variables in the task's runtime.
turbo run build --env-mode=loose
```
The same behavior can also be set via the `TURBO_ENV_MODE=strict` system variable.
#### `strict`
Only environment variables specified in the following keys are
Expand Down Expand Up @@ -320,13 +324,13 @@ Do not cache results of the task.
turbo run dev --no-cache
```
### `--no-daemon`
Default: `false`
### `--daemon` and `--no-daemon`
`turbo` can run a background process to pre-calculate values used for determining work that needs to be done. This standalone process (daemon) is an optimization, and not required for proper functioning of `turbo`.
Passing `--no-daemon` instructs `turbo` to avoid using or creating the standalone process.
Passing `--daemon` instructs `turbo` to use the standalone process, while `--no-daemon` instructs `turbo` to avoid using or creating the standalone process.
The same behavior can also be set via the `TURBO_DAEMON=true` system variable.
### `--output-logs <option>`
Expand Down
8 changes: 4 additions & 4 deletions packages/turbo-types/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export interface RootSchema extends BaseSchema {
/**
* Specify the filesystem cache directory.
*
* Documentation: https://turbo.build/repo/docs/reference/configuration#tasks
* Documentation: https://turbo.build/repo/docs/reference/configuration#cachedir
*
* @defaultValue `"".turbo/cache"`
*/
Expand All @@ -165,10 +165,10 @@ export interface RootSchema extends BaseSchema {
/**
* Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:
*
* - **Strict Mode**: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.
* - **Loose Mode**: Allow all environment variables for the process to be available.
* - `"strict"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.
* - `"loose"`: Allow all environment variables for the process to be available.
*
* Documentation: https://turbo.build/repo/docs/crafting-your-repository/using-environment-variables#environment-modes
* Documentation: https://turbo.build/repo/docs/reference/configuration#envmode
*
* @defaultValue `"strict"`
*/
Expand Down

0 comments on commit 988bdbe

Please sign in to comment.