turborepo

Configure Turborepo task orchestration and caching for JavaScript/TypeScript monorepos.

3|2|Updated Mar 14, 2023
One-click install
npx skills add https://github.com/2digits-agency/configs --skill turborepo-2digits-agency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/2digits-agency/configs/tree/main/.agents/skills/turborepo
Command: npx skills add https://github.com/2digits-agency/configs --skill turborepo-2digits-agency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turborepo guidance for configuring and orchestrating monorepo task pipelines, caching strategies, and CI optimization to speed up builds.

Core Features & Use Cases

  • Package-scoped tasks that enable parallelization and per-package caching across apps and packages.
  • Global and package-level configuration via turbo.json and per-package turbo.json to tailor behavior.
  • CI integration and filtering to optimize pipelines using --affected, --filter, and remote caching.
  • Package Configurations and best practices for extending root config and using $TURBO_EXTENDS$ in multi-package workspaces.

Quick Start

Set up per-package tasks in each package.json, register them in the root turbo.json, and run 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 configure Turborepo task pipelines for a JavaScript monorepo?

To configure Turborepo task pipelines, set up per-package tasks in each package.json and register them in the root turbo.json. This orchestrates monorepo builds, enabling parallelization, correct dependency definitions, and caching strategies.

What is the best way to speed up CI builds in a monorepo using caching?

The best way to speed up CI builds is implementing remote caching and task filtering. By configuring turbo.json with proper inputs and outputs, Turborepo caches package-scoped tasks and uses --filter to run only affected pipelines.

Can I use package-level turbo.json configurations alongside a root config?

Yes, you can use package-level turbo.json configurations to tailor behavior. You can extend root configurations in multi-package workspaces by using the $TURBO_EXTENDS$ variable to apply global settings while customizing per-package tasks.

Does Turborepo handle environment variables and task dependencies for monorepo builds?

Yes, Turborepo handles environment variables and task dependencies for monorepo builds. It ensures correct dependency definitions using the ^ syntax, proper outputs and inputs tracking, and environment variable handling within your CI pipelines.

How do I run only affected tasks in a monorepo CI pipeline?

To run only affected tasks in a monorepo CI pipeline, use the --filter or --affected flags when running turbo run <task>. This optimizes pipelines by skipping unaffected packages and leveraging existing cached outputs.