A simple tool to run pnpm
commands on selected groups of packages from your pnpm-workspace.yaml
.
-
Install
pnpm
globally:npm i -g pnpm
-
Define groups in your
pnpm-workspace.yaml
:# ... groups: MyGroup: - package1 - package2 Test: - '@org/*-ui' # any kind of pattern supported by pnpm is allowed Build: - pkg-core... # use X... to match dependencies of X or ...X to match dependents of X
Instead of running pnpm
, use pnpmf
(or the shortcut pf
) to select groups interactively.
# before
pnpm install
# after
pf install
# before
pnpm --parallel build
# after
pf --parallel build
- When you run
pf
, it prompts you to select one or more groups. - It then passes the selected packages as filters to
pnpm
.
For example:
pf install # selects Test and MyGroup
# Equivalent to:
pnpm -F package1 -F package2 -F @org/*-ui install
MIT