Allow workspace-relative paths in --filter
#10152
ethanresnick
started this conversation in
Ideas
Replies: 1 comment
-
Would you be able to use |
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
-
Goals
I often have commands like
turbo build --filter='./apps/*'
that attempt to run some turbo task(s) on a specific set of packages by directory. However, currently, this command only works if I'm in the root directory of the repo, because the filter path is relative tocwd
. However, I'd like to be able to have commands like this that can run successfully, regardless of my current working directory. That way, I can save the command under some alias, or share the command around my company, and not have tocd
into a specific directory (or tell others that they need to do this) before the command will work.Non-goals
Everything other than the specific scenario above.
Background
See goals.
Proposal
Turbo already seems to have a notion of the "root directory" (where the root package lives and the
turbo.json
file is), which seems to be captured by the--cwd
option. So, I'd propose exposing that with some microsyntax that's usable in path-based filters. For example:turbo build --filter='<TURBO_ROOT_DIR>/apps/*'
That's just one possible approach, though. I'm totally agnostic on the approach, but I would like to see a way to handle this use case.
Beta Was this translation helpful? Give feedback.
All reactions