diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-11-19 07:45:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 12:45:09 +0000 |
commit | 661aa22c03f829489e2d9289dee0a8292a95227a (patch) | |
tree | b16f4a37f2f221540f1b22f986f5c58eb19cc913 /cli/schemas | |
parent | 069bc15030225393f7d05521505316066464bdbd (diff) |
feat(task): dependencies (#26467)
This commit adds support for "dependencies" in `deno task` subcommand:
```jsonc
{
"tasks": {
"build": "deno run -RW build.ts",
"generate": "deno run -RW generate.ts",
"serve": {
"command": "deno run -RN server.ts",
"dependencies": ["build", "generate"]
}
}
}
```
Executing `deno task serve` will first execute `build` and `generate`
tasks (in parallel) and once both complete the `serve` task will be executed.
Number of tasks run in parallel is equal to the no of cores on the
machine, and respects `DENO_JOBS` env var if one is specified.
Part of https://github.com/denoland/deno/issues/26462
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
Diffstat (limited to 'cli/schemas')
-rw-r--r-- | cli/schemas/config-file.v1.json | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index 56a8090f9..3ba803ef8 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -448,6 +448,13 @@ "type": "string", "required": true, "description": "The task to execute" + }, + "dependencies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tasks that should be executed before this task" } } } |