-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the feature you'd like to request
Right now you need to be in the repository root in order to run turbo commands. This is because it looks for the turbo.json file in the current directory. We've run into some problems with people running pnpm -- turbo run build in subdirectories when working in the monorepo. It would be great if it could run from anywhere in a monorepo.
Describe the solution you'd like
I think a fair solution would be for turbo to traverse the directory tree seeking out a turbo.json. This would support every kind of monorepo, as well as those that aren't using npm.
Describe alternatives you've considered
Another option I considered was implementing functionality for detecting the workspace root according to the package manager. This seems aligned with some of the existing code that's specific to the package manager, but, I think it further entrenches Turborepo in the JavaScript ecosystem. It seems more appropriate that turbo commands should find the root based on its own configuration file.