Docs
Codebase

Dependency Management

Learn how to manage dependencies in Achromatic.

We chose pnpm as our package manager due to its speed and disk space efficiency.

Install all packages

To install all packages in all workspaces run:

pnpm i

This is likely your first command when you download the starter kit.

Clean workspace

To clean the whole workspace run following command:

pnpm clean:workspaces

Or alternatively in a specific workspace:

cd apps/dashboard
pnpm clean

Add a package

To install a package to the root of the monorepo, making it available to all workspaces, run:

pnpm add -w <package-name>

To install a package to a specific workspace, making it available only to that workspace, run:

pnpm add --filter <workspace-name> <package-name>

Remove a package

To remove a package from the root of the monorepo, run:

pnpm remove -w <package-name>

To remove a package from a specific workspace, run:

pnpm remove --filter <workspace-name> <package-name>

Update a package

This step is redundant because we automatically sync the package versions. You can just update the version somewhere in the monorepo and run pnpm i to sync. However pnpm also comes with a nice update command

pnpm update -r <package-name>