Turborepo Tutorial: Run Every Package With One Command
Quick answer Turborepo is a build tool for JavaScript and TypeScript monorepos: one command builds every package in the right order and caches the results, so an unchanged package is never rebuilt. This post builds a small shop monorepo with a shared pricing package and a shop app, then shows the second build finishing in 17 milliseconds because the cache hits. A small online shop in Karachi sells kurtas and dupattas. The shop app prices each order, the admin page prices refunds, and a checkout helper prices the cart, and each of the three copies the same discount rule: 10 percent off orders of Rs 10,000 or more, plus 5 percent tax. One day the discount changes to 15 percent, two copies get updated, and the third keeps charging the old price until a customer complains. A monorepo fixes the copying by putting the shared code in one package that every app imports. Turborepo makes that monorepo practical: it runs each package's build in dependency order and remembers the results. W...