Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.12 KB

README.md

File metadata and controls

68 lines (47 loc) · 1.12 KB

PNPMF

PNPMF Example

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