Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions runtime/reference/cli/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,22 @@ pattern. A wildcard pattern is specified with the `*` character.
```json title="deno.json"
{
"tasks": {
"build-client": "deno run -RW client/build.ts",
"build-server": "deno run -RW server/build.ts"
"build:client": "deno run -RW client/build.ts",
"build:server": "deno run -RW server/build.ts"
}
}
```

Running `deno task "build-*"` will run both `build-client` and `build-server`
Running `deno task "build:*"` will run both `build:client` and `build:server`
tasks.

For multi-word task names, we recommend using `:` as the separator (e.g.
`build:client`, `test:unit`, `lint:fix`) to match the convention used in the
npm ecosystem and to group related tasks for wildcard matching.

:::note

**When using a wildcard** make sure to quote the task name (eg. `"build-*"`),
**When using a wildcard** make sure to quote the task name (eg. `"build:*"`),
otherwise your shell might try to expand the wildcard character, leading to
surprising errors.

Expand Down Expand Up @@ -210,16 +214,16 @@ useful to logically group several tasks together:
```json title="deno.json"
{
"tasks": {
"dev-client": "deno run --watch client/mod.ts",
"dev-server": "deno run --watch sever/mod.ts",
"dev:client": "deno run --watch client/mod.ts",
"dev:server": "deno run --watch server/mod.ts",
"dev": {
"dependencies": ["dev-client", "dev-server"]
"dependencies": ["dev:client", "dev:server"]
}
}
}
```

Running `deno task dev` will run both `dev-client` and `dev-server` in parallel.
Running `deno task dev` will run both `dev:client` and `dev:server` in parallel.

## Node and npx binary support

Expand Down
Loading