devebot-cli
Advanced tools
Comparing version 0.1.2 to 0.1.3
'use strict'; | ||
var fs = require('fs'); | ||
var lodash = require('lodash'); | ||
// Project metadata. | ||
var pkg = JSON.parse(fs.readFileSync(__dirname + '/../../package.json', 'utf8')); | ||
var pkgAppinfo = lodash.pick(pkg, ['version', 'name', 'description', 'homepage', 'author', 'license']); | ||
@@ -14,8 +16,12 @@ var appinfo = {}; | ||
// Commandline header. | ||
appinfo.displayCliHeader = function() { | ||
console.log('%s: %s (v%s)', pkg.name, pkg.description, pkg.version); | ||
appinfo.displayCliHeader = function(clidef) { | ||
clidef = clidef || {}; | ||
var info = clidef.appinfo || pkgAppinfo; | ||
console.log('%s: %s (v%s)', info.name, info.description, info.version); | ||
}; | ||
// Commandline footer. | ||
appinfo.displayCliFooter = function() { | ||
appinfo.displayCliFooter = function(clidef) { | ||
clidef = clidef || {}; | ||
var info = clidef.appinfo || pkgAppinfo; | ||
[ | ||
@@ -25,3 +31,3 @@ "", | ||
"For more information about installing and configuring devebot, please see the guide:", | ||
pkg.homepage, | ||
info.homepage || pkgAppinfo.homepage, | ||
"", | ||
@@ -28,0 +34,0 @@ ].forEach(function(str) { console.log(str); }); |
{ | ||
"name": "devebot-cli", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "command line interface", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
9239
72