which-pkg-manager
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

which-pkg-manager

NPM TypeScript

Get the package manager used by a project.

If I should maintain this repo, please ⭐️ GitHub stars

DM me on Twitter if you have questions or suggestions. Twitter


Installation

npm install which-pkg-manager
yarn add which-pkg-manager
pnpm add which-pkg-manager
bun add which-pkg-manager

Usage

import {
  getPackageManagerName,
  isNPM,
  isYarn,
  isPNPM,
  isBun
} from "which-pm-lockfile";

const pmName = await getPackageManagerName(); // "npm" | "yarn" | "pnpm" | "bun" | undefined

const npm = await isNPM(); // true | false
const yarn = await isYarn(); // true | false
const pnpm = await isPNPM(); // true | false
const bun = await isBun(); // true | false

Dependenciesdependencies


Dev Dependencies

  • autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.

License license

MIT

Package Sidebar

Install

npm i which-pkg-manager

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

6.21 kB

Total Files

4

Last publish

Collaborators

  • bconnorwhite