@antfu/nip
v0.1.1
Published
A better pnpm install xxx with prompts and catalogs support
Readme
nip
A better pnpm install xxx with prompts and catalogs support.
[!NOTE] This CLI is pnpm-specific and opinionated, you might want to use
@antfu/nifor other scenarios.
pnpm i @antfu/nipnip vueThen it will prompts you to select the catalog to install the package to, and update pnpm-workspace.yaml and package.json for you.
You can also explicitly set the catalog with
--catalog flag.
nip vue --catalog frontendWhy?
pnpmis currently lacking of the--catalogoption to directly install packages to catalog, resulting in quite a few manual operations to maintain the catalogs. On the other hand, pnpm's current codebase structure is a bit too complex to add this feature as an outside contributor. So this tool is more like a quick workaround.- Sometimes the dependency might already presented in the workspace/catalogs. This tool would pick existing version/catalog automatically.
- My workflow might be a bit opinionated, FYI: Categorize Your Dependencies
Todos
- [x] Support inferring current workspace packages and fill
workspace:*automatically. - [ ] Prompts to edit entries (if select "no" in "looks good")
Sponsors
License
MIT License © Anthony Fu
