Skip to content

Run check-engines instantly, print errors and exit process if test failed.

Notifications You must be signed in to change notification settings

linkeo/check-engines-instant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

check-engines-instant

Run check-engines instantly, print errors and exit process if test failed.

Installation

npm install check-engines-instant

Usage

Just require and call this package at the very beginning of your program.

// The very beginning, e.g. The beginning of index.js

// Basic usage, program will exit with code -1 if run with an wrong node version.
require('check-engines-instant')();

// Customize program exit code
require('check-engines-instant')(-2);

// Call a callback function instead of terminating program.
require('check-engines-instant')(function(err) {
  // Do someting after check
  // `err` argument is the same as the one in callback of check-engines
});

// Print errors only.
require('check-engines-instant')(function(err) {});

// Start your program now.
// ...

For more informations about check-engines, see krupple/check-engines

For more informations about npm engines, see npm docs about package.json

About

Run check-engines instantly, print errors and exit process if test failed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published