has-pnpm
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

has-pnpm

NPM npm npm npm type definitions Gitlab pipeline status

Check if a project is using pnpm.

It'll check whether shrinkwrap.yaml or pnpm-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

Readme

Keywords

Package Sidebar

Install

npm i has-pnpm

Weekly Downloads

355

Version

1.1.1

License

MIT

Unpacked Size

6.49 kB

Total Files

7

Last publish

Collaborators

  • illuminator