1.0.2 • Published 4 years ago

check-dependency-engines v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

About

Install

Used as a cli util:

npm i check-dependency-engines -g

Used as a dev util:

npm i check-dependency-engines -D

Usage

As a cli util:

> check-dependency-engines

Options:

  • --help, -h Show help
  • --version, -v Show version number
  • --allow-pre-release, -p Allow match pre-release version
  • --exact, -e Use exact version when update
  • --disable-auto-install, -t Disable auto install after update
  • --update, -u Auto update package.json file
  • --cwd, -d Current Working Directory
  • --registry, -r Registry url for npm repository

As a package:

;(async () => {
  const Checker = require('check-dependency-engines')
  const ck = new Checker({
    cwd: process.cwd(), // current working dir
    registry: 'https://npm.registry.some.domain', // npm registry for download metadata
    preRelease: false, // should match pre-release version of dependency
    exact: true, // should use exact version when update matched version of dependency
    update: true, // should auto update package.json when there ara some changes
    log: 'log', // can be a string as log level (log、warn、error) or a function, or false to disable.
  })
  const data = await ck.verify()
  // the data is an object that contains all dependency info.
})()

Author

check-dependency-engines © Stone, Released under the MIT License.