1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| {
"version": "2.0.0",
"tasks": [
{ // [BASIC]
"hide": true, // - Hides the task from the Run Task Quick Pick (which can be useful for elements of a compound task that are dependency of other tasks, and not independently runnable)
"type": "shell", // - The type of task. Common values: "shell", "process", "npm", "gulp", "grunt", "docker", etc.
"label": "[EG] Example npm run watch", // - The label of the task, used to identify it in the UI and for dependencies
"detail": "[EG] Execute npm run watch", // - The detail of the task, shown at the bottom of the label in the run task UI
"command": "npm run watch", // - The command to execute. For "shell" type, this is the shell command. (for "npm" tasks, it is "script" instead)
//
"options": { // [OPTIONS]
"cwd": "${workspaceFolder}", // - the working directory for the command. (Defaults to workspace root)
"env": { // - environment variables to set for the command.
//"EXAMPLE_ENV_1": "value1", // * example environment variable (key-value pair)
//"EXAMPLE_ENV_2": "value2", // * example environment variable (key-value pair)
//"EXAMPLE_ENV_3": "value3", // * example environment variable (key-value pair)
},
},
"group": { // [GROUP]
"kind": "none", // - Valid values: "build", "test", "none" (default)
"isDefault": false // - Whether this is the default task for the group. (true/false)
},
"presentation": { // [PRESENTATION]
"reveal": "always", // - controls whether the output is revealed. ("always" (always show panel), "silent" (only show panel when there is an error), "never" (never show panel))
"focus": false, // - controls whether to focus the terminal. ("false" (do not focus, default), "true" (focus))
"clear": false, // - controls whether to clear the terminal before running. (true/false)
"echo": true, // - controls whether to echo the executed command. (true/false)
"panel": "shared", // - controls whether the terminal instance is shared between task runs. ("shared" (default, reuse existing terminal from other tasks), "dedicated" (use dedicated terminal for each task run, if task rerun it will use the same terminal), "new" (new terminal instance for each task run))
"showReuseMessage": true, // - controls whether to show the task in the status bar. (true/false)
"close": false, // - controls whether to close the terminal when the task is done. (true/false)
"group": "npm" // - controls whether the task is executed in a specific terminal group using split panes. Tasks in the same group (specified by any "string" value) will use split terminals to present instead of a new terminal panel.
},
"dependsOrder": "sequence", // [DEPENDS] Controls whether the task runs after its dependencies. ("sequence" or "parallel")
"dependsOn": [ // [DEPENDS] Array of task labels.
//"label of task-x", // - make the task dependent on: task-x (enter "label" of task-x)
//"label of task-y", // - make the task dependent on: task-y (enter "label" of task-y)
//"label of task-z" // - make the task dependent on: task-z (enter "label" of task-z)
],
"problemMatcher": [],
"runOptions": { // [RUN OPTIOSN] specify a task's run behaviors
"runOn": "folderOpen", // - controls whether the task is run on folder open. ("default", "folderOpen")
"instanceLimit": 0 // - controls the maximum number of instances of this task that can run concurrently. (0 = unlimited, default)
}
}
]
}
|