Skip to content

Commit 1a8df44

Browse files
authored
fix: readd environment reference (#2378)
1 parent 82ad1de commit 1a8df44

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

website/.vitepress/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ export default defineConfig({
218218
{
219219
text: 'Package API',
220220
link: '/docs/reference/package'
221+
},
222+
{
223+
text: 'Environment',
224+
link: '/docs/reference/environment'
221225
}
222226
]
223227
},
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Environment Reference
3+
description: A reference for the Taskfile environment variables
4+
outline: deep
5+
---
6+
7+
# Environment Reference
8+
9+
Task allows you to configure some behavior using environment variables. This
10+
page lists all the environment variables that Task supports.
11+
12+
| ENV | Default | Description |
13+
| ----------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
14+
| `TASK_TEMP_DIR` | `.task` | Location of the temp dir. Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. |
15+
| `TASK_REMOTE_DIR` | `TASK_TEMP_DIR` | Location of the remote temp dir (used for caching). Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. |
16+
| `TASK_OFFLINE` | `false` | Set the `--offline` flag through the environment variable. Only for remote experiment. CLI flag `--offline` takes precedence over the env variable |
17+
| `FORCE_COLOR` | | Force color output usage. |
18+
19+
## Custom Colors
20+
21+
| ENV | Default | Description |
22+
| --------------------------- | ------- | ----------------------- |
23+
| `TASK_COLOR_RESET` | `0` | Color used for white. |
24+
| `TASK_COLOR_RED` | `31` | Color used for red. |
25+
| `TASK_COLOR_GREEN` | `32` | Color used for green. |
26+
| `TASK_COLOR_YELLOW` | `33` | Color used for yellow. |
27+
| `TASK_COLOR_BLUE` | `34` | Color used for blue. |
28+
| `TASK_COLOR_MAGENTA` | `35` | Color used for magenta. |
29+
| `TASK_COLOR_CYAN` | `36` | Color used for cyan. |
30+
| `TASK_COLOR_BRIGHT_RED` | `91` | Color used for red. |
31+
| `TASK_COLOR_BRIGHT_GREEN` | `92` | Color used for green. |
32+
| `TASK_COLOR_BRIGHT_YELLOW` | `93` | Color used for yellow. |
33+
| `TASK_COLOR_BRIGHT_BLUE` | `94` | Color used for blue. |
34+
| `TASK_COLOR_BRIGHT_MAGENTA` | `95` | Color used for magenta. |
35+
| `TASK_COLOR_BRIGHT_CYAN` | `96` | Color used for cyan. |
36+
37+
All color variables are [ANSI color codes][ansi]. You can specify multiple codes
38+
separated by a semicolon. For example: `31;1` will make the text bold and red.
39+
Task also supports 8-bit color (256 colors). You can specify these colors by
40+
using the sequence `38;2;R:G:B` for foreground colors and `48;2;R:G:B` for
41+
background colors where `R`, `G` and `B` should be replaced with values between
42+
0 and 255.
43+
44+
For convenience, we allow foreground colors to be specified using shorthand,
45+
comma-separated syntax: `R,G,B`. For example, `255,0,0` is equivalent to
46+
`38;2;255:0:0`.
47+
48+
[ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code

0 commit comments

Comments
 (0)