Turborepo
A build tool for JavaScript monorepos that runs package tasks in dependency order, in parallel, and skips work whose inputs have not changed.
In more detail
Turborepo reads turbo.json to learn which tasks exist (build, lint, test), what each depends on and which files each produces. Before running a task it hashes the inputs; if it has seen that hash before it replays the saved outputs instead of running the task again. The cache can be shared with teammates and CI through remote caching.
Example
turbo run build --filter=webRelated terms
- monorepo — A single version-control repository that holds several related projects, such as a web app, an API and their shared libraries.
- task graph — A map of which build tasks depend on which others, used to decide what must run first and what can run at the same time.
- remote caching — Storing build outputs on a shared server so that any developer or CI machine with the same inputs can download the result instead of rebuilding.
- dependsOn — The turbo.json setting that lists which tasks must finish before a task runs, where a leading caret means the same task in every dependency package.
- cache — A store of earlier answers kept close to where they are needed so they can be reused instead of fetched or computed again.
Taught in
- Monorepo Architecture: Workspaces & Turborepo — Production Full-Stack Engineering
- Unified Build Pipelines: Caching & Dependency Graphs — Production Full-Stack Engineering