has-package-lock

Check if a `package-lock.json` is present in the working directory

MIT 5 个版本
安装
npm install has-package-lock
yarn add has-package-lock
pnpm add has-package-lock
bun add has-package-lock
README

has-package-lock

Check if a package-lock.json is present in the working directory

Package Version Downloads Status Coverage Status

Installation

npm install --save has-package-lock

Usage

$ tree
.
├── bar
│   ├── package-lock.json
│   └── package.json
└── foo
    └── package.json
const hasPackageLock = require('has-package-lock');

hasPackageLock('bar');
//=> true

hasPackageLock('foo');
//=> false

API

hasPackageLock([cwd])

Returns boolean.

cwd

Type: string
Default: process.cwd()

Current working directory.

  • has-lockfile - Check which lockfile is present in the working directory
  • has-yarn - Check if a project is using Yarn
  • pkg-man - Detect which package manager that should be used

License

MIT © Lufty Wiranda

版本列表
2.0.0 2018-01-17
1.1.0 2017-08-23
1.0.3 2017-08-22
1.0.2 2017-08-13
1.0.0 2017-08-11