Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

which-pm-lockfile

NPM TypeScript Coverage Status GitHub Stars Twitter Follow

Check if a project uses yarn, npm, or pnpm.

Installation

yarn add which-pm-lockfile
npm install which-pm-lockfile

Example usage:

import {
  getPackageManagerName,
  getLockfile,
  hasYarn,
  hasNPM,
  hasPNPM,
  PackageManagerName,
  PackageManagerLockfile
} from "which-pm-lockfile";

getPackageManagerName() => Promise<PackageManagerName | undefined>;

getLockfile() => Promise<PackageManagerLockfile | undefined>;

hasYarn() => Promise<boolean>;

hasNPM() => Promise<boolean>;

hasPNPM() => Promise<boolean>;

type PackageManagerName = "yarn" | "npm" | "pnpm";

type PackageManagerLockfile = "yarn.lock" | "package-lock.json" | "shrinkwrap.yaml";

Dependenciesdependencies

  • @bconnorwhite/package: A utility for reading package.json of a project, and forming paths relative to it.

Dev DependenciesDavid


License license

MIT

About

Check if a project uses yarn, npm, or pnpm. Supports yarn workspaces.

Resources

Packages

No packages published