Replies: 1 comment
-
|
I'm not sure that this is a feature that we would likely pick up. When building the graph, it's usually simplest to model it as unidirectional - and configuring it as such matches that model. I'll leave this Discussion open to see if this idea picks up steam and will revisit in the future. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
I'd like to define global dependencies from inside the packages like this:
{ "$schema": "https://turborepo.org/schema.json", "extends": [ "//" ], "pipeline": { "build": { "dependedBy": [ "test" ] } }, }This would result in any
testtask, regardless of the dependency graph, requiring this package to run itsbuildscript before anytesttask can run.Now, I'm aware that this can be defined on the top level
turbo.jsonfile like this:{ "$schema": "https://turborepo.org/schema.json", "pipeline": { "test": { "dependsOn": [ "testrec#build" ], "outputMode": "new-only" } } }Why?
This however couples this
turbo.jsonto this specific project, and having a bunch of projects, I'd like to have a singleturbo.jsonthat I can copy into all of them.Some projects have unique dependencies, outside of the dependency tree.
Workaround
I can define a
turbo.jsonfile in every package to define this unique dependency{ "$schema": "https://turborepo.org/schema.json", "extends": [ "//" ], "pipeline": { "test": { "dependsOn": [ "^build", "testrec#build" ] } } }But this means I have to put this in every package, better than nothing, but kinda ugly. And I can forget it when creating a new package.
Beta Was this translation helpful? Give feedback.
All reactions