Reuse existing log methods
This commit is contained in:
parent
66380197f4
commit
3023111896
13
app.js
13
app.js
@ -5,18 +5,17 @@ var fs = require('fs');
|
||||
var _ = require('underscore');
|
||||
var semver = require('semver');
|
||||
|
||||
var nodejsVersion = process.versions.node;
|
||||
|
||||
// jshint undef:false
|
||||
if (!semver.satisfies(nodejsVersion, '>6.9.0')) {
|
||||
console.log(`Node version ${nodejsVersion} is not supported, please use Node.js 6.9 or higher.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var log = console.log.bind(console);
|
||||
var logError = console.error.bind(console);
|
||||
// jshint undef:true
|
||||
|
||||
var nodejsVersion = process.versions.node;
|
||||
if (!semver.satisfies(nodejsVersion, '>6.9.0')) {
|
||||
logError(`Node version ${nodejsVersion} is not supported, please use Node.js 6.9 or higher.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var argv = require('yargs')
|
||||
.usage('Usage: $0 <environment> [options]')
|
||||
.help('h')
|
||||
|
Loading…
Reference in New Issue
Block a user