5 * Copyright (c) 2016 Tyler Kellen, contributors
6 * Licensed under the MIT license.
7 * https://github.com/gruntjs/grunt-init/blob/master/LICENSE-MIT
13 var pkg = require('../package.json');
15 // Display grunt-cli version.
16 exports.version = function() {
17 console.log('grunt-cli v' + pkg.version);
20 // Show help, then exit with a message and error code.
21 exports.fatal = function(msg, code) {
23 console.log('Fatal error: ' + msg);
29 // Show help and exit.
30 exports.help = function() {
37 exports.helpHeader = function() {
38 console.log('grunt-cli: ' + pkg.description + ' (v' + pkg.version + ')');
43 exports.helpFooter = function() {
45 'If you\'re seeing this message, grunt hasn\'t been installed locally to',
46 'your project. For more information about installing and configuring grunt,',
47 'please see the Getting Started guide:',
49 'http://gruntjs.com/getting-started',
50 ].forEach(function(str) { console.log(str); });