A few versions ago we were allowed to change our tasks in deno.json from just a string of concatenated commands to an object that lists dependencies to be ran before the command. At the moment though these dependant tasks can only be executed as is. It would be nice if we could pass additional flags to it while still keeping that parallelism this change enabled.
Example
In this below example, deno task cov shows what I'm asking. Where both coverage and clean flags are passed to it. Allowing them to only be generated if viewing the coverage is desired.
{
"tasks": {
"cov": {
"command": "deno coverage --html .coverage/",
"dependencies": ["test --coverage='.coverage/' --clean"]
},
"cov:mac": {
"command": "open .coverage/html/index.html",
"dependencies": ["cov"]
},
"cov:lin": {
"command": "xdg-open .coverage/html/index.html",
"dependencies": ["cov"]
},
"cov:win": {
"command": "start .coverage/html/index.html",
"dependencies": ["cov"]
},
"test": "deno test -R='.output/' -W='.output/' --parallel --trace-leaks --reporter=dot",
"lint": "deno lint",
"fmt": "deno fmt",
"ok": { "command": "deno task test --doc", "dependencies": ["fmt", "lint"] }
}
}
A few versions ago we were allowed to change our tasks in
deno.jsonfrom just a string of concatenated commands to an object that lists dependencies to be ran before the command. At the moment though these dependant tasks can only be executed as is. It would be nice if we could pass additional flags to it while still keeping that parallelism this change enabled.Example
In this below example,
deno task covshows what I'm asking. Where both coverage and clean flags are passed to it. Allowing them to only be generated if viewing the coverage is desired.{ "tasks": { "cov": { "command": "deno coverage --html .coverage/", "dependencies": ["test --coverage='.coverage/' --clean"] }, "cov:mac": { "command": "open .coverage/html/index.html", "dependencies": ["cov"] }, "cov:lin": { "command": "xdg-open .coverage/html/index.html", "dependencies": ["cov"] }, "cov:win": { "command": "start .coverage/html/index.html", "dependencies": ["cov"] }, "test": "deno test -R='.output/' -W='.output/' --parallel --trace-leaks --reporter=dot", "lint": "deno lint", "fmt": "deno fmt", "ok": { "command": "deno task test --doc", "dependencies": ["fmt", "lint"] } } }