1.1.1 • Published 5 years ago

has-pnpm v1.1.1

Weekly downloads
529
License
MIT
Repository
gitlab
Last release
5 years ago

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

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago