Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

package-engines-notifier

1.1.0 • Public • Published

package-engines-notifier npm AppVeyor Status Travis CI Status

warns users about incompatible Node.js versions per engines in package.json

Usage

enginesNotify(options: EnginesNotifierOptions) => Error | null

type EnginesNotifierOptions = {
  pkg: PackageJson
}
  • see upstream documentation for PackageJson

  • if there is engine trouble, outputs a message using console.error(), and returns an Error

  • otherwise, no output, and returns null

Example

const { enginesNotify } = require('package-engines-notifier')
 
const pkg = require('./package.json')
 
if (enginesNotify({ pkg })) {
  // uh-oh, the user's engines don't match, stop right here
  return
}
 
// TODO: what your script does when engines match

Contributing

Development

npm install --global flow-typed
npm install
flow-typed install
npm test

See Also

install

npm i package-engines-notifier

Downloadsweekly downloads

115

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability