123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 'use strict';
- var pkg = require('../package.json');
- exports.version = function() {
- console.log('grunt-cli v' + pkg.version);
- };
- exports.fatal = function(msg, code) {
- exports.helpHeader();
- console.log('Fatal error: ' + msg);
- console.log('');
- exports.helpFooter();
- process.exit(code);
- };
- exports.help = function() {
- exports.helpHeader();
- exports.helpFooter();
- process.exit();
- };
- exports.helpHeader = function() {
- console.log('grunt-cli: ' + pkg.description + ' (v' + pkg.version + ')');
- console.log('');
- };
- exports.helpFooter = function() {
- [
- 'If you\'re seeing this message, grunt hasn\'t been installed locally to',
- 'your project. For more information about installing and configuring grunt,',
- 'please see the Getting Started guide:',
- '',
- 'https://gruntjs.com/getting-started',
- ].forEach(function(str) { console.log(str); });
- };
|