Monorepo setup with pnpm workspaces + Turborepo
Views
1.8K
Copies
332
Likes
258
Comments
0
Copy rate
18.0%
Prompt
Act as a senior platform engineer. Generate the minimum set of files to bootstrap a monorepo using pnpm workspaces and Turborepo.
Project name: [project_name]
Packages to include: [packages]
Produce these files with correct contents:
- Root `package.json` with `pnpm` scripts for dev / build / lint / test / clean, plus `packageManager` pinned
- `pnpm-workspace.yaml` with `apps/*` and `packages/*`
- `turbo.json` v2 with named pipelines for build, lint, test, dev — proper `dependsOn`, `outputs`, and `cache` settings
- `.npmrc` with `node-linker=hoisted` off, `strict-peer-dependencies=false`, and `auto-install-peers=true`
- Root `tsconfig.base.json` consumed by every package
- `.gitignore` covering `node_modules`, `.turbo`, `dist`, `.next`, `coverage`
- A minimal example `packages/ui/package.json` that is consumable via workspace protocol
- A `packages/ui/tsconfig.json` that extends the base config
Output format:
- Return a single code block per file, with a header comment `// === path ===` on the line above each file's content
- No prose outside those blocksCustomise this prompt
Fill in 2 variables to personalise this prompt
Preview
Act as a senior platform engineer. Generate the minimum set of files to bootstrap a monorepo using pnpm workspaces and Turborepo.
Project name: [project_name]
Packages to include: [packages]
Produce these files with correct contents:
- Root `package.json` with `pnpm` scripts for dev / build / lint / test / clean, plus `packageManager` pinned
- `pnpm-workspace.yaml` with `apps/*` and `packages/*`
- `turbo.json` v2 with named pipelines for build, lint, test, dev — proper `dependsOn`, `outputs`, and `cache` settings
- `.npmrc` with `node-linker=hoisted` off, `strict-peer-dependencies=false`, and `auto-install-peers=true`
- Root `tsconfig.base.json` consumed by every package
- `.gitignore` covering `node_modules`, `.turbo`, `dist`, `.next`, `coverage`
- A minimal example `packages/ui/package.json` that is consumable via workspace protocol
- A `packages/ui/tsconfig.json` that extends the base config
Output format:
- Return a single code block per file, with a header comment `// === path ===` on the line above each file's content
- No prose outside those blocks