Skip to content

thomas3577/dx

Repository files navigation

Deno Task CLI

JSR Version JSR Score ci

A Deno CLI for lazy typists.

Install

deno install --allow-read --allow-run --allow-sys --allow-env --allow-write --unstable-kv -g -n dx jsr:@dx/dx

Update

dx update

Commands

Run app

dx main.ts

will execute:

deno run main.ts

Run app (without extention)

dx app

will execute:

deno run app.ts

Note:
If a deno task with this name exists, it will be executed.

Run app (with args)

dx --allow-read app

will execute:

deno run --allow-read app.ts

Run Deno Task

deno.json:

{
  "tasks" {
    "do": "deno lint && deno fmt"
  }
}
dx do

will execute:

deno task do

Run Deno Command

dx test

will execute:

deno test

Dry-run

If you only want to see what is being executed, put the argument --dry-run at the end of the commands.

dx test --dry-run

Init Deno

dx init

will execute:

deno init

...but...

dx init app

...executes a slightly extended init. The value behind dx init creates an initial file with this name. This means that dx init main creates the file main.ts (and main.test.ts).

Limitation

dx does not call deno REPL. If you want to start REPL, execute deno directly.

dx -h or dx --help calls the own help. If you want to call the deno help, use the original commands like deno -h deno --help or deno help.