-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add support for wildcards in deno task
#26944
Comments
fwiw, we found that we didn't need this so much in Wireit since you usually have a plain {
"tasks": {
"build": {
"dependencies": ["build:frontend", "build:server", "build:queue"]
},
"build:frontend": "...",
"build:server": "...",
"build:queue": "...",
"serve": "..."
}
} One case where we have wanted some wildcard like functionality is in running the same script in a monorepo dependencies instead of having to list each dependency out again in the Wireit config. ie, the "build" script for A runs the "build" script for B, C, and D, automatically if those are local monorepo dependencies with "build" scripts: So instead of: packages/a/package.json {
"tasks": {
"build": {
"dependencies": ["../b:build", "../c:build", "../d:build"]
}
}
} you'd have: {
"tasks": {
"build": {
"dependencies": [
{
"script": "build",
"packages": "dependencies"
}
]
}
}
} See google/wireit#23 |
Thanks for comment @justinfagnani. Would something like this work for you?
That way we don't have to develop two separate features - just need to accept wildcards in "cross-package" dependencies. |
note that I'm not a potential user here, I'm just relaying my experience with Wireit :)
This is semantically differently than running scripts in dependencies. Here you're saying to run scripts in every package under The more complete example config would be: {
"tasks": {
"build": {
"dependencies": [
{
"script": "build",
"packages": "dependencies"
}
]
}
},
"dependencies": {
"@foo/b": "^1.0.0",
"@foo/c": "^1.0.0",
"@foo/d": "^1.0.0"
}
} Where Running scripts in dependencies has been the main use case for wildcard-like functionality, because without that feature the config has to repeat data already in package dependencies. I would personally suggest starting with that rather than a general wildcard feature. |
It would be great if one could do
deno task build:*
to run all tasks that start withbuild:
.Eg:
running
deno task build:*
would matchbuild:frontend
,build:server
andbuild:queue
and run them all in parallel.Somewhat related to #26462
The text was updated successfully, but these errors were encountered: