Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing multiple tasks in a single task #43305

Closed
123swk123 opened this issue Feb 9, 2018 · 1 comment
Closed

Executing multiple tasks in a single task #43305

123swk123 opened this issue Feb 9, 2018 · 1 comment
Assignees
Labels
tasks Task system issues

Comments

@123swk123
Copy link

is it possible to call a task from another task?

I am not currently looking for recursion but just sequencing 2 or 3 tasks under one task.

@vscodebot vscodebot bot added the tasks Task system issues label Feb 9, 2018
@dbaeumer
Copy link
Member

dbaeumer commented Feb 9, 2018

Yes, a task can have a dependsOn property. Something like:

{
	"version": "2.0.0",
	"tasks": [
		{
			"taskName": "compile",
			"dependsOn": [
				"compile:server",
				"compile:client"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"problemMatcher": []
		},
		{
			"taskName": "compile:types",
			"type": "shell",
			"command": "npm run compile:types",
			"group": "build",
			"presentation": {
				"panel": "dedicated",
				"reveal": "never"
			},
			"problemMatcher": [
				"$tsc"
			]
		},
		{
			"taskName": "compile:jsonrpc",
			"type": "shell",
			"command": "npm run compile:jsonrpc",
			"group": "build",
			"presentation": {
				"panel": "dedicated",
				"reveal": "never"
			},
			"problemMatcher": [
				"$tsc"
			]
		},
		{
			"taskName": "compile:protocol",
			"type": "shell",
			"command": "npm run compile:protocol",
			"group": "build",
			"presentation": {
				"panel": "dedicated",
				"reveal": "never"
			},
			"problemMatcher": [
				"$tsc"
			],
			"dependsOn": [
				"compile:types",
				"compile:jsonrpc"
			]
		},
		{
			"taskName": "compile:server",
			"type": "shell",
			"command": "npm run compile:server",
			"group": "build",
			"presentation": {
				"panel": "dedicated",
				"reveal": "never"
			},
			"problemMatcher": [
				"$tsc"
			],
			"dependsOn": [
				"compile:types",
				"compile:jsonrpc",
				"compile:protocol"
			]
		},
		{
			"taskName": "compile:client",
			"type": "shell",
			"command": "npm run compile:client",
			"group": "build",
			"presentation": {
				"panel": "dedicated",
				"reveal": "never"
			},
			"problemMatcher": [
				"$tsc"
			],
			"dependsOn": [
				"compile:types",
				"compile:jsonrpc",
				"compile:protocol"
			]
		}
	]
}

@dbaeumer dbaeumer closed this as completed Feb 9, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

2 participants