Skip to main content
Module

x/drake/mod.ts

Drake is a make-like task runner for Deno.
Go to Latest
import * as drake from "https://deno.land/x/drake@v1.6.0/mod.ts";

Classes

Drake task.

Variables

The Drake env API function gets and optionally sets the command-line options, task names and variables.

Functions

Write an error message to to stderr and terminate execution.

Write the title and message to stderr if it is a TTY and the --debug command-line option was specified or the DRAKE_DEBUG shell environment variable is set.

Set description of next registered task.

Execute task action functions. First the non-async actions are executed synchronously then the async actions are exectuted asynchronously. Silently skip tasks that have no action function.

Return a sorted array of normalized file names matching the wildcard glob patterns. Valid glob patterns are those supported by Deno's path library. Example: glob("tmp/*.ts", "lib/*.ts", "mod.ts");

Log a message to stdout. Do not log the message if the --quiet command-line option is set.

Create directory.

Quote string array values with double-quotes then join them with a separator. Double-quote characters are escaped with a backspace. The separator defaults to a space character.

Read the entire contents of a file synchronously to a UTF-8 string.

Delete files matching the wildcard glob patterns. Example: remove("tmp/*.ts", "lib/*.ts", "mod.ts");

Execute named tasks along with their prerequisite tasks (direct and indirect). If no task names are specified then the command-line tasks are run. If no command-line tasks were specified the default task (set in env("--default-task")) is run.

Execute commands asynchronously in the command shell.

Execute command in the command shell and return a promise for {code, output, error} (the exit code, the stdout output and the stderr output).

Return FileInfo (or null if file does not exist).

Create and register a task. Returns the task object.

Find and replace in text file synchronously. If the file contents is unchanged return false. If the contents has changed write it to the file and return true.

Returns the Drake version number string.

Write text to a file synchronously. If the file exists it will be overwritten. Returns true if a new file was created. Returns false if the file already exists.

Interfaces

shCapture API options.

sh API options.