which-lockfiles

1.0.0 • Public • Published

which-lockfiles

Get the package managers for lockfiles in a directory.

Supports npm, pnpm, and yarn.

Usage

const whichLockfiles = require('which-lockfiles')
 
whichLockfiles()
  .then(files => console.log(files))
  .catch(err => console.error(err))
//> ["package-lock.json"]

Synchronous:

const whichLockfiles = require('which-lockfiles').sync
 
const files = whichLockfiles()
console.log(files)
//> ["package-lock.json"]

API

whichLockfiles(dir?: string)
  • dir : Directory to look for lockfiles in. Defaults to process.cwd.

License

MIT

Package Sidebar

Install

npm i which-lockfiles

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.79 kB

Total Files

4

Last publish

Collaborators

  • eddyerburgh