Skip to content

Commit

Permalink
Include grunt-cli version with --version
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Feb 10, 2018
1 parent 7b8cb3f commit ea01dc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/grunt
Expand Up @@ -10,6 +10,7 @@ var extensions = require('interpret').jsVariants;
var nopt = require('nopt');
var gruntOptions = require('grunt-known-options');
var completion = require('../lib/completion.js');
var pkg = require('../package.json');

// Parse `gruntOptions` into a form that nopt can handle.
var aliases = {};
Expand All @@ -26,6 +27,10 @@ Object.keys(gruntOptions).forEach(function(key) {
// Parse them and return an options object.
var options = nopt(known, aliases, process.argv, 2);

if (options.version) {
console.log('grunt-cli v' + pkg.version);
}

v8flags(function (err, v8flags) {
var Grunt = new Liftoff({
name: 'grunt',
Expand Down

0 comments on commit ea01dc5

Please sign in to comment.