Filter a task on a specific package with dependsOn
#3183
|
Setup I've created a package.json {
"workspaces": [
"apps/*",
"packages/*"
],
"scripts": {
"package": "turbo run package",
"lint": "turbo run lint",
"build": "turbo run build",
"test": "turbo run test",
},
}turbo.json {
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"lint": {
"outputs": []
},
"test": {
"outputs": []
},
"build": {
"dependsOn": ["^build"],
"outputs": [
"dist/**",
".output/**",
".histoire/**",
"**/.vitepress/dist/**"
]
},
"package": {
"dependsOn": ["lint", "test", "build"]
},
}
}When I run pnpm package --filter websiteI expect the Even though it's saying • Packages in scope: website
• Running package in 1 packages
It's also weird because if I acknowledge that both projects are concerned, |
Answered by
mehulkar
Feb 17, 2023
Replies: 1 comment
|
This is mostly expected.
|
0 replies
Answer selected by
anthonyshew
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is mostly expected.
website, because of the--filter websitein your CLI commandbuildruns forwebsitebecause you asked it tobuildruns forui, becausebuild:dependsOn: [^build], which means website's dependencies (i.e.ui) will also runbuildtestdoes not run foruibecause there's nothing in the graph that causes it to runlintruns forwebsitebecause it's part ofpackagelintrunning foruiseems wrong. Any chance you could make a runnable example and push it up to Github? I can debug from there