Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(task): support object notation, remove support for JSDocs #26886

Merged
merged 10 commits into from
Nov 16, 2024

Conversation

bartlomieju
Copy link
Member

This commit changes three aspects of deno task:

  1. Tasks can now be written using object notation like so:
{
  "tasks": {
     "foo": "deno run foo.js",
     "bar": {
        "command": "deno run bar.js"
     }
}
  1. Support for comments for tasks is now removed. Comments above tasks will
    no longer be printed when running deno task.
  2. Tasks written using object notation can have "description" field that replaces
    support for comments above tasks:
{
  "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 #26467 to
support "dependencies" in tasks. Additionally some cleanup was performed to make
code easier to read.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit 84e1238 into denoland:main Nov 16, 2024
17 checks passed
@bartlomieju bartlomieju deleted the deno_task_refactor branch November 16, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants