vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.21k stars 1.81k forks source link

Docs: Installing turborepo local or global #7415

Closed alex-page closed 4 months ago

alex-page commented 8 months ago

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

arlyon commented 8 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

Bat-signal

alex-page commented 8 months ago

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.

anthonyshew commented 8 months ago

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.

alex-page commented 8 months ago

Ahhh amazing. Thanks a ton @anthonyshew!

anthonyshew commented 8 months ago

Here's what I've initially written, in case it can help you today!

Getting Started Installation

alex-page commented 8 months ago

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.

afroguy16 commented 7 months ago

Please test out yarn? It's mostly broken for the latest yarn version.

anthonyshew commented 4 months ago

This page is now live: https://turbo.build/repo/docs/getting-started/installation