这是indexloc提供的服务,不要输入任何密码
Skip to content

Execute turbo from anywhere in a monorepo #1412

@ObliviousHarmony

Description

@ObliviousHarmony

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions