turborepo

Configure Turborepo task orchestration, caching, and filtering in turbo.json.

2|Updated Jan 5, 2024
One-click install
npx skills add https://github.com/wilfriedago/dotfiles --skill turborepo-wilfriedago
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/wilfriedago/dotfiles/tree/main/agents/skills/turborepo
Command: npx skills add https://github.com/wilfriedago/dotfiles --skill turborepo-wilfriedago

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill optimizes monorepo build processes by intelligently managing tasks, dependencies, and caching, significantly reducing build times and improving developer efficiency.

Core Features & Use Cases

  • Task Orchestration: Define and run build, test, and lint tasks across multiple packages.
  • Intelligent Caching: Cache task outputs to avoid redundant work, speeding up subsequent builds.
  • Dependency Awareness: Understands package dependencies to run tasks in the correct order.
  • Filtering & Affected: Run tasks only on packages that have changed, ideal for CI/CD.
  • Use Case: In a monorepo with dozens of packages, ensure that only the changed packages and their dependents are built and tested during a CI pipeline, drastically cutting down execution time.

Quick Start

Load the turborepo skill to help configure a new task in turbo.json.

Frequently Asked Questions about turborepo

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

FAQPage Schema
How do I speed up monorepo builds by caching task outputs?

Monorepo build systems use intelligent caching to store task outputs, avoiding redundant work and speeding up subsequent builds. This ensures tasks are only re-executed when underlying inputs change.

How do I run CI/CD pipelines only on changed packages in a monorepo?

Filtering patterns allow you to run tasks only on packages that have changed. This is ideal for CI/CD pipelines, ensuring only affected packages and their dependents are built and tested to cut execution time.

What is task orchestration and how does it manage monorepo dependencies?

Task orchestration defines and runs build, test, and lint tasks across multiple packages. It understands package dependencies to run tasks in the correct order based on the monorepo's dependency graph.

How do I configure tasks and environment variables in turbo.json?

Configuring turbo.json involves defining task execution rules, caching strategies, and filtering patterns. You can manage environment variable handling to ensure correct cache hits across different execution contexts.

Do I need a specific monorepo structure to use task orchestration effectively?

Task orchestration works best with best practices for monorepo structure. While flexible, organizing packages with clear dependency boundaries ensures the build system correctly maps dependencies and executes tasks efficiently.