JSPM

has-package-lock

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 494
  • Score
    100M100P100Q97931F
  • License MIT

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

Package Exports

  • has-package-lock

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (has-package-lock) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

has-package-lock

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

Package Version Downloads Status Build Status: Linux 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