-
SummaryI'm working on migrating an existing large repository to use yarn workspaces and turborepo. There are a few NPM scripts that exist in the Of course the long term solution is to make these NPM scripts more "standalone" so that they work without the extra setup. I'm looking for a quicker solution so we can get a broad integration done before optimizing it. Is it possible tell turbo to ignore specific scripts? We have "test" as a Turborepo task, but I'd like to ignore "package1#test" while still running "package2#test". I am hoping for something that is in the turbo config so that I can set it globally instead of having to filter ever turbo call. Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There isn't a way to do exactly what you're describing today. However, it sounds like a workaround might be to get creative with script naming. For instance:
Then, you'd need to rename the script in Note: You could also choose to use a Package Configuration if this is a one-off for a specific package, to get that task definition localized. Let me know if that helps. I could not taking account an important piece of your puzzle. |
Beta Was this translation helpful? Give feedback.
-
I'm running into a similar issue and am using the The task I need to filter on is a dependency of other tasks so I also have to manually apply the filter to those commands too. I don't really want to have to change the underlying scripts in my packages since they use bog standard I'm doing this atm: turbo run build --filter="!my-app"
turbo run test --filter="!my-app" # test depends on build, if this filter isn't set build will run for `my-app` Would it be feasible to have a E.g. "build": {
"filter": ["!my-app"], <-- Any tasks dependent on `build` will also skip `my-app`
"dependsOn": ["generate", "^build"],
"outputs": ["dist/**", ".next/**"]
},
"test": {
"dependsOn": ["build", "^test"],
"outputs": ["coverage/**"]
}, |
Beta Was this translation helpful? Give feedback.
Package configuration sounds useful, but in this case I don't want Turbo to ever run a particular task. For now I've gone with "test-not-turbo". Not very elegant, but it works.