Running tasks from the root after package tasks complete #9027
Unanswered
mkvlrn-cm42
asked this question in
Help
Replies: 1 comment
-
It sounds like you could do {
"tasks": {
"build": {
...
},
"post-build": {
"dependsOn": ["^build"]
}
}
} You could do some script renaming here to make things a little more expressive of what you're actually meaning to do, but I haven't renamed above to help connect the logic of how it works more easily with where you're currently at. |
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
-
Summary
I'm having a hard time understanding how to setup tasks in
turbo.json
in order to have the following happen when I runturbo build
:build
in my packages runpost-build
in the rootpackage.json
file runThis works fine, the tasks are executed perfectly in each package:
The
post-build
task in my rootpackage.json
will copy the outputs from the build task from each package to the root:I know I could just add a script in the root with
turbo run build && yarn post-build
, and that's what I'm doing right now, but I would like to gradually add a more "native" turbo workflow to the project.Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions