has-pnpm
v1.1.1
Published
Check if a project is using pnpm.
Downloads
1,062
Readme
has-pnpm
Check if a project is using pnpm.
It'll check whether
shrinkwrap.yaml
orpnpm-lock.yaml
exists in current working directory.
Installation
npm install has-pnpm
# or
yarn add has-pnpm
# or
pnpm install has-pnpm
CLI
You can also install as global package to use CLI.
npm install -g has-pnpm
# or
yarn global add has-pnpm
has-pnpm
Check if a project is using pnpm.
Options:
--help, -h Show help [boolean]
--version, -v Show version number [boolean]
Usage
├── a
│ ├── package.json
│ └── package-lock.json
├── b
│ ├── package.json
│ └── shrinkwrap.yaml
└── c
├── package.json
└── pnpm-lock.yaml
const hasPNPM = require('has-pnpm');
hasPNPM('a'); // => false
hasPNPM('b'); // => true
hasPNPM('c'); // => true
API
hasPNPM(cwd)
Return: boolean
Return result of checking pnpm usage.
cwd
Type: string
Default: process.cwd()
Current working directory.
Related
- has-yarn - Check if a project is using Yarn.
- caniuse-pnpm - Check if pnpm is available.