turborepo

Orchestrate JavaScript/TypeScript monorepo tasks with dependency-aware parallel execution and caching.

Updated Jun 22, 2024
One-click install
npx skills add https://github.com/lem0n4id/learnin10 --skill turborepo-lem0n4id
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/lem0n4id/learnin10/tree/main/.github/skills/turborepo
Command: npx skills add https://github.com/lem0n4id/learnin10 --skill turborepo-lem0n4id

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turborepo provides a scalable, dependency-aware build orchestration for JavaScript/TypeScript monorepos, enabling fast, cache-powered task execution across multiple apps and packages.

Core Features & Use Cases

  • Caches task outputs and runs tasks in parallel based on the dependency graph to speed up builds.
  • Enforces package-level tasks over root tasks to enable per-package caching, isolation, and precise filtering.
  • Supports Package Configurations, extends root config, and mechanisms like transit nodes to optimize parallelism with correct cache invalidation.
  • Useful for CI optimization, affected builds, and large workspace structures, including monorepo patterns and best practices.

Quick Start

Define a root turbo.json and optional package turbo.json files, add package scripts per package, and invoke turbo run <task> to orchestrate builds.

Frequently Asked Questions about turborepo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up builds in a JavaScript monorepo?

To speed up builds in a JavaScript monorepo, you can use a build orchestrator that caches task outputs and runs tasks in parallel based on the dependency graph. This significantly reduces build times across multiple apps and packages.

How does caching work for monorepo CI pipelines?

Caching for monorepo CI pipelines works by storing task outputs and restoring them on subsequent runs if the underlying dependencies have not changed. This optimizes continuous integration by skipping redundant work across affected packages.

How do I configure tasks for individual packages in a monorepo?

You configure tasks for individual packages by defining scripts in each package's configuration and invoking the orchestrator to run them. This enforces per-package caching and isolation while inheriting settings from the root configuration.

Can I run tasks in parallel across multiple packages without breaking dependencies?

Yes, you can run tasks in parallel across multiple packages without breaking dependencies by using a dependency-aware orchestration mechanism. It tracks the dependency graph to maximize parallelism while ensuring correct execution order and cache invalidation.

What is the best way to run affected builds for a TypeScript workspace?

The best way to run affected builds for a TypeScript workspace is to use a task runner that supports advanced filtering and dependency graph analysis. This allows you to build only the apps and packages affected by recent changes, maximizing speed and correctness.

Do I need root-level scripts to run monorepo tasks?

No, you do not need root-level scripts to run monorepo tasks. The system enforces package-level tasks over root tasks to enable precise per-package filtering, isolation, and caching, while still extending the root configuration when needed.