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: deno task dependencies should allow passing additional arguments #27870

Open
BlackAsLight opened this issue Jan 30, 2025 · 0 comments
Open

Comments

@BlackAsLight
Copy link

A few versions ago we were allowed to change our tasks in deno.json from just a string of concatenated commands to an object that lists dependencies to be ran before the command. At the moment though these dependant tasks can only be executed as is. It would be nice if we could pass additional flags to it while still keeping that parallelism this change enabled.

Example

In this below example, deno task cov shows what I'm asking. Where both coverage and clean flags are passed to it. Allowing them to only be generated if viewing the coverage is desired.

{
  "tasks": {
    "cov": {
      "command": "deno coverage --html .coverage/",
      "dependencies": ["test --coverage='.coverage/' --clean"]
    },
    "cov:mac": {
      "command": "open .coverage/html/index.html",
      "dependencies": ["cov"]
    },
    "cov:lin": {
      "command": "xdg-open .coverage/html/index.html",
      "dependencies": ["cov"]
    },
    "cov:win": {
      "command": "start .coverage/html/index.html",
      "dependencies": ["cov"]
    },
    "test": "deno test -R='.output/' -W='.output/' --parallel --trace-leaks --reporter=dot",
    "lint": "deno lint",
    "fmt": "deno fmt",
    "ok": { "command": "deno task test --doc", "dependencies": ["fmt", "lint"] }
  }
}
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

No branches or pull requests

1 participant