which-pm-lockfile

    1.1.1 • Public • Published

    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

    Install

    npm i which-pm-lockfile

    DownloadsWeekly Downloads

    19

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    7.01 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar