deno-task-runner-v2

Version 2 of deno-task-runner. All credit goes to @jinjor who created this project. I have only fixed current issues and am keeping the project up to date with Deno.

Write and run tasks in Deno.

Should you wish to run tasks and watch for file changes, then check out https://github.com/eliassjogreen/denon.

Requirements

  • Deno v1.0.1 (@0.52.0)

Example

Create your tasks file:

// tasks.ts
import { task } from "https://deno.land/x/task_runner_v2@master/mod.ts";

// A task is defined like so:
// task('say-hello', 'echo hello', 'echo world', ...)
//        ^^^^^^^      ^^^^^^        ^^^^^^^^
//       task name    1st task       2nd task

// To call tasks from another task, we use their name and prefix it with "$":
// task('run-say-hello', '$say-hello')

// Create our real tasks
task("prepare", "echo preparing...");
task("say-hello", "echo hello");
task("all", "$prepare", "$say-hello");

Now you can choose which tasks to run, running all will run the prepare task, then the say-hello task, where as running say-hello will only echo hello:

$ deno --allow-env --allow-run tasks.ts all
preparing...
hello

$ deno tasks.ts say-hello
hello

$

LICENSE

MIT