Skip to content

Instantly share code, notes, and snippets.

@diverted247
Created November 23, 2015 19:23
Show Gist options
  • Save diverted247/226df2e47e7f9ee612d6 to your computer and use it in GitHub Desktop.
Save diverted247/226df2e47e7f9ee612d6 to your computer and use it in GitHub Desktop.
env - environment task to test against engine in package.json and one executing
var gulp = require('gulp');
var validatenv = require('validate-node-version')();
gulp.task( 'env' , function (){
if( !validatenv.satisfies ){
console.error(validatenv.message);
process.exit(1);
}
});
{
"name": "myapp",
"version": "1.0.0",
"description": "myapp",
"main": "index.js",
"private": true,
"license": "BSD",
"engines" : {
"node" : "0.12.7"
},
"devDependencies": {
"gulp": "3.9.0",
"validate-node-version": "1.1.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment