-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #26462 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Marvin Hagemeister <marvin@deno.com>
- Loading branch information
1 parent
069bc15
commit 661aa22
Showing
36 changed files
with
506 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"tests": { | ||
"basic1": { | ||
"cwd": "basic1", | ||
"tempDir": true, | ||
"args": "task run", | ||
"output": "./basic1.out" | ||
}, | ||
"basic2": { | ||
"cwd": "basic2", | ||
"tempDir": true, | ||
"args": "task run", | ||
"output": "./basic2.out" | ||
}, | ||
"cross_package": { | ||
"cwd": "cross_package/package1", | ||
"tempDir": true, | ||
"args": "task run", | ||
"output": "./cross_package.out", | ||
"exitCode": 1 | ||
}, | ||
"diamond": { | ||
"cwd": "diamond", | ||
"tempDir": true, | ||
"args": "task a", | ||
"output": "./diamond.out" | ||
}, | ||
"diamond_list": { | ||
"cwd": "diamond", | ||
"tempDir": true, | ||
"args": "task", | ||
"output": "./diamond_list.out" | ||
}, | ||
"diamond_big": { | ||
"cwd": "diamond_big", | ||
"tempDir": true, | ||
"args": "task a", | ||
"output": "./diamond_big.out" | ||
}, | ||
"diamond_big_list": { | ||
"cwd": "diamond_big", | ||
"tempDir": true, | ||
"args": "task", | ||
"output": "./diamond_big_list.out" | ||
}, | ||
"cycle": { | ||
"cwd": "cycle", | ||
"tempDir": true, | ||
"output": "./cycle.out", | ||
"args": "task a", | ||
"exitCode": 1 | ||
}, | ||
"cycle_2": { | ||
"cwd": "cycle_2", | ||
"tempDir": true, | ||
"args": "task a", | ||
"output": "./cycle_2.out", | ||
"exitCode": 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Task build1 deno run ../build1.js | ||
Task build2 deno run ../build2.js | ||
[UNORDERED_START] | ||
Starting build1 | ||
build1 performing more work... | ||
build1 finished | ||
Starting build2 | ||
build2 performing more work... | ||
build2 finished | ||
[UNORDERED_END] | ||
Task run deno run ../run.js | ||
run finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"tasks": { | ||
"build1": "deno run ../build1.js", | ||
"build2": "deno run ../build2.js", | ||
"run": { | ||
"command": "deno run ../run.js", | ||
"dependencies": ["build1", "build2"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Task build1 deno run ../build1.js | ||
Starting build1 | ||
build1 performing more work... | ||
build1 finished | ||
Task build2 deno run ../build2.js | ||
Starting build2 | ||
build2 performing more work... | ||
build2 finished | ||
Task run deno run ../run.js | ||
run finished |
Oops, something went wrong.