import { task } from "https://deno.land/x/task_runner_v2@v1.0.3/mod.ts";
Define a task.
task("prepare", "echo preparing...");
task("counter", "deno counter.ts");
task("thumb", "deno https://deno.land/thumb.ts");
task("all", "$prepare", ["$counter alice", "$counter bob"], "$thumb");
^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^
1st task 2nd task (parallel) 3rd task
- Use $name to call other tasks. You can also pass arguments.
- Use array to run commands in parallel.
Add file watcher. Usage is the same as https://github.com/jinjor/deno-watch.
task("compile", "echo changed", "$all").watchSync("src", options);
task("dev-server", "echo restarting...", "$server").watch("server");
watchSync
waits for running tasks, whilewatch
does not.watch
kills processes if they are running.