1.0.4 • Published 4 months ago

pnpmf v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

A simple tool to run pnpm commands on selected groups of packages from your pnpm-workspace.yaml.

Installation

  1. Install pnpm globally:

    npm i -g pnpm
  2. 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

Usage

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

How it works

  1. When you run pf, it prompts you to select one or more groups.
  2. 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

License

MIT