Generators
pm-install
The pm-install
or pm-i
generator generates installation commands for several JavaScript package managers.
Example
Input
<!-- automd:pm-install name="package-name" dev -->
<!-- /automd -->
Output
<!-- automd:pm-install name="package-name" dev -->
```sh
# ✨ Auto-detect
npx nypm install -D package-name
# npm
npm install -D package-name
# yarn
yarn add -D package-name
# pnpm
pnpm install -D package-name
# bun
bun install -D package-name
# deno
deno install --dev package-name
```
<!-- /automd -->
Arguments
name
string
The package name (by default tries to read from the name
field in package.json
).
dev
boolean
Install as a dev dependency (defaults to false
).
separate
boolean
Separate code blocks for each package manager (defaults to false
).
auto
boolean
Auto-detect package manager using unjs/nypm (defaults to true
).
version
boolean
Show version in install command