Skip to content

Instantly share code, notes, and snippets.

@adambisek
Created January 12, 2017 17:05
Show Gist options
  • Save adambisek/01afeced6961582984d188f6ae2659d2 to your computer and use it in GitHub Desktop.
Save adambisek/01afeced6961582984d188f6ae2659d2 to your computer and use it in GitHub Desktop.
import semver from 'semver';
import { engines } from './package';
const version = engines.node;
if (!semver.satisfies(process.version, version)) {
console.log(`Required node version ${version} not satisfied with current version ${process.version}.`);
process.exit(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment