Closed alex-page closed 4 months ago
The primary benefit of global turbo that turbo is able to delegate to the 'local turbo' (whatever is in your repo) meaning anywhere you go you can just do turbo x
(rather than worrying about what the package manager is) and get the same version as your collaborators. This will become more useful as we begin to tackle feature like turbo automatically running install
for you, or turbo being able to exec
in your workspace. I agree, we could do better to communicate this. Calling @anthonyshew
Thanks @arlyon.
In my project I have started using npx turbo
as it checks if there is a local install or adds one for use. That makes sense for me. It felt a bit odd that I had to read a lot of docs to understand why turbo was recommended as a global install over a dev dependency.
Good news: I'm doing a nearly-full rewrite of our documentation and this is something that I've already done. I'll come back and close this when it's shipped.
Ahhh amazing. Thanks a ton @anthonyshew!
Here's what I've initially written, in case it can help you today!
Thanks @anthonyshew this is solves all my problems. Feel free to close the issue or keep it open to track it. This reads much better with the intro paragraph introducing both ways to install.
Please test out yarn? It's mostly broken for the latest yarn version.
This page is now live: https://turbo.build/repo/docs/getting-started/installation
What is the improvement or update you wish to see?
As a developer reading this page I was confused why I am being recommended up front to install turborepo globally. It does this multiple times in the documentation. Reading the install page down the very bottom in the "Install per repository" section it recommends installing it as a dev dependency and says "You may wish to pin the version of Turborepo used within a repository, especially if you are collaborating with other developers. In that case, add turbo as a dev dependency at the root of the repository:"
Is there any context that might help us understand?
I would assume the majority of developers are using turborepo with other developers and would want to benefit from remote-caching. Could this become the default or can we add a better reason why global is the recommended way to install the package.
Does the docs page already exist? Please link to it.
https://turbo.build/repo/docs/installing