Deno has a built-in Task Runner since v1.20 (released Mar 17, 2022).
Commands are defined in the project's Deno configuration file under a "tasks"
key. For example:
{
"tasks": {
"data": "deno task collect && deno task analyze",
"collect": "deno run --allow-read=. --allow-write=. scripts/collect.js",
"analyze": "deno run --allow-read=. scripts/analyze.js"
}
}
Tasks are listed with deno task
and run with deno task task-name [additional-args]...
. E.g. the data
task would be run with deno task data
.
More details in the Task Runner docs. (This link points to the latest version's docs.)
However, in the v1.26.1 (the latest version as of Oct 16, 2022) docs, the Task Runner is still considered unstable:
⚠️ deno task
was introduced in Deno v1.20 and is unstable.
It may drastically change in the future.
I don't know which build tool is recommended with Deno, but my hunch is that it would be the Task Runner, at least once it becomes stable, as it's built-in to Deno.