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): Task description in the form of comments #23101

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

nathanwhit
Copy link
Member

Closes #22786.

TLDR;

{
  "tasks": {
    // Some comment
    //
    // describing what the task does
    "dev": "deno run -A --watch main.ts"
  }
}
deno task

Screenshot 2024-03-27 at 1 43 49 PM

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, fun!

@nathanwhit nathanwhit merged commit 2dc37f4 into denoland:main Mar 27, 2024
17 checks passed
@nathanwhit nathanwhit deleted the deno-task-docs branch March 27, 2024 21:14
let parse_options = deno_config::ParseOptions {
include_task_comments: matches!(
flags.subcommand,
DenoSubcommand::Task(..)
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, this could be further optimized to DenoSubcommand::Task(TaskFlags { task: None, .. }).

Copy link
Member Author

@nathanwhit nathanwhit Mar 27, 2024

Choose a reason for hiding this comment

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

I thought about that, but we also print available tasks when you try to run a task that doesn't exist. I guess we could just not show the comments then (or reparse the config?) but seemed more trouble than it's worth

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.

"deno task" should support JSDoc as task description
3 participants