1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/cli/args
Bartek Iwańczuk 84e1238648
feat(task): support object notation, remove support for JSDocs (#26886)
This commit changes three aspects of `deno task`:
1. Tasks can now be written using object notation like so:
```jsonc
{
  "tasks": {
     "foo": "deno run foo.js",
     "bar": {
        "command": "deno run bar.js"
     }
}
```
2. Support for comments for tasks is now removed. Comments above tasks
will
no longer be printed when running `deno task`.
3. Tasks written using object notation can have "description" field that
replaces
support for comments above tasks:
```jsonc
{
  "tasks": {
     "bar": {
        "description": "This is a bar task"
        "command": "deno run bar.js"
     }
}
```
```
$ deno task
Available tasks:
- bar
    // This is a bar task
    deno run bar.js
```

Pulled most of the changes from
https://github.com/denoland/deno/pull/26467 to
support "dependencies" in tasks. Additionally some cleanup was performed
to make code easier to read.

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-16 12:18:17 +01:00
..
deno_json.rs BREAKING(config): make supported compilerOptions an allow list (#25432) 2024-09-04 17:39:30 +02:00
flags.rs fix: otel resiliency (#26857) 2024-11-14 12:16:28 +00:00
flags_net.rs refactor(runtime/permissions): use concrete error types (#26464) 2024-11-04 09:17:21 -08:00
import_map.rs refactor(permissions): split up Descriptor into Allow, Deny, and Query (#25508) 2024-09-16 21:39:37 +01:00
lockfile.rs feat(byonm): support deno run npm:<package> when package is not in package.json (#25981) 2024-10-02 21:17:39 +01:00
mod.rs feat(task): support object notation, remove support for JSDocs (#26886) 2024-11-16 12:18:17 +01:00
package_json.rs fix: surface package.json location on dep parse failure (#26665) 2024-10-31 15:35:17 +00:00