Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 928 Bytes

monorepo.md

File metadata and controls

39 lines (30 loc) · 928 Bytes

Monorepo Guide

ForgeTS uses a monorepo structure managed by pnpm workspaces.

Structure

.
├── packages/           # Shared packages and libraries
│   ├── cli/            # The main CLI tool
│   └── ...
├── apps/ (Optional)    # Deployable applications
├── docs/               # Documentation
└── scripts/            # Repository maintenance scripts

Workspaces

We define our workspaces in pnpm-workspace.yaml. This allows us to:

  • Hoist shared dependencies (like React, TypeScript) to the root node_modules to save space.
  • Link packages locally so changes in one package are immediately available to others.

Common Tasks

Add a dependency to a specific package

pnpm --filter @forge-ts/cli add lodash

Add a dependency to the root

pnpm add -w -D typescript

Run a script in all packages

pnpm -r run build