pnpm

Provides build/install/test helpers for projects using pnpm and a package.json. Supports batch (cascade) builds when pnpm-workspace.yaml and a root package.json exist at the Terrabuild workspace root.

Available Commands

CommandDescription
testRuns the test script (pnpm run test) across targeted workspaces.
runRuns an arbitrary pnpm script (pnpm run <target>).
installInstalls packages with pnpm install, optionally honoring the lockfile and batching across workspaces.
buildRuns the build script (pnpm run build) across targeted workspaces.
<command>Runs an arbitrary pnpm command (Terrabuild action name is forwarded to pnpm).

Project Initializer

Infers project metadata from package.json (dependencies and default outputs).

project {
  @pnpm { }
}

Equivalent to:

project {
    ignores = [ "node_modules/**" ]
    outputs = [ "dist/**" ]
}
Last updated on