-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Auto-Scoped Task Execution In Monorepo Packages #550
Comments
Agree 100000000%. It's annoying. There are two parts of this: |
Totally agree! Or at least have a way to run turborepo on a specific package including its dependencies, but excluding the package itself. So for example I can run This would even be more versatile I suppose as it could be used with Yarn 2+. We use Yarn v3 and |
To workaround this problem I have created a nodejs script(turbo-w.js) that execute the given command as turbo command even when it's run from the package itself. Just sharing if it can help someone else as well https://gist.github.com/hariombalhara/b69deed932dd1ce73bb7cb86cada5a8b I would still need to go and update the package scripts itself. |
You can do this by installing |
Describe the feature you'd like to request
This is similar to the request in #417.
It would be extremely helpful to be able to run turbo-repo commands within individual packages rather than solely at the root of a monorepo. Often times it can be faster and easier to run commands (test, lint, etc) within a specific package while developing, especially if that package is depended on by many other packages or apps within the project.
Describe the solution you'd like
Within a package, I can run
turbo run <task>
. When this happens, turbo-repo will automatically determine the correct "scope" of the task to the directory the command was executed in, rundependsOn
tasks, but not execute the task for any dependencies of the package. Any outputs of this should feed back into turbo-repo's cache.I believe this maps to:
turbo run <task> --scope="<monorepo-rel-path-to-cwd>" --no-deps --include-dependencies
Describe alternatives you've considered
Updating package.json in 50+ monorepo packages * N different tasks to perform:
cd ../<monorepo-root> && yarn turbo run <task> --scope=<package-path>
which is extremely time consuming and brittle.The text was updated successfully, but these errors were encountered: