Skip to content

giuseppe-trisciuoglio/developer-kit / plugins/developer-kit-typescript/skills/turborepo-monorepo

turborepo-monorepo

Verified

Provides comprehensive Turborepo monorepo management guidance for TypeScript/JavaScript projects. Use when creating Turborepo workspaces, configuring turbo.json tasks, setting up Next.js/NestJS apps, managing test pipelines (Vitest/Jest), configuring CI/CD, implementing remote caching, or optimizing build performance in monorepos

FileKindSize
SKILL.mdskill md9.2 KB
references/ci-cd.mdmarkdown6.3 KB
references/nestjs-config.mdmarkdown3.1 KB
references/nextjs-config.mdmarkdown1.7 KB
references/package-configs.mdmarkdown3.9 KB
references/testing-config.mdmarkdown4.1 KB
references/turbo.jsonconfig868 B

references/nextjs-config.md

View on GitHub
# Next.js in Turborepo

## Package Structure

```
apps/
  web/
    package.json
    next.config.js
    tsconfig.json
    next-env.d.ts
libs/
  ui/
    package.json
    tsconfig.json
    index.ts
```

## web/package.json

```json
{
  "name": "web",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "typecheck": "tsc --noEmit"
  },
  "dependencies": {
    "next": "^15.1.0",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "ui": "*"
  },
  "devDependencies": {
    "@next/eslint-plugin-next": "^15.1.0",
    "typescript": "^5.7.2",
    "eslint": "^9",
    "eslint-config-next": "^15.1.0"
  }
}
```

## turbo.json for Next.js

```json
{
  "$schema": "https://turborepo.dev/schema.json",
  "pipeline": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": [".next/**", "!.next/cache/**"],
      "env": ["NEXT_PUBLIC_*"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    },
    "lint": {
      "outputs": []
    }
  }
}
```

## With app router

```json
{
  "pipeline": {
    "build": {
      "outputs": [
        ".next/**",
        "!.next/cache/**",
        ".next/server/**"
      ]
    }
  }
}
```

## Incremental Static Regeneration (ISR)

For ISR with Next.js, exclude fetch cache from outputs:

```json
{
  "pipeline": {
    "build": {
      "outputs": [
        ".next/**",
        "!.next/cache/**",
        "!.next/server/pages/**/_buildManifest.js"
      ]
    }
  }
}
```

## Image optimization

Next.js image optimization cache should be excluded:

```json
{
  "pipeline": {
    "build": {
      "outputs": [
        ".next/**",
        "!.next/cache/**",
        "!.next/static/media/**"
      ]
    }
  }
}
```
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall