1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-15 10:07:07 +01:00
This commit is contained in:
hacksalot
2016-01-18 00:34:57 -05:00
parent c9e45d4991
commit 712cba57b8
17 changed files with 122 additions and 229 deletions

View File

@ -131,10 +131,10 @@ Definition of the `main` function.
/** Massage command-line args and setup Commander.js. */
function initialize( ar ) {
logMsg( _title );
var o = initOptions( ar );
o.silent || logMsg( _title );
// Emit debug prelude if --debug was specified
if( o.debug ) {
_out.log(chalk.cyan('The -d or --debug switch was specified. DEBUG mode engaged.'));
@ -213,8 +213,14 @@ Definition of the `main` function.
return v === '-d' || v === '--debug';
});
// Grab the --silent flag
var isSilent = _.some( args, function(v) {
return v === '-s' || v === '--silent';
});
return {
debug: isDebug,
silent: isSilent,
orgVerb: oVerb,
verb: verb,
json: oJSON,
@ -229,7 +235,7 @@ Definition of the `main` function.
loadOptions.call( this, opts, this.parent.jsonArgs );
var hand = require( './error' );
hand.init( _opts.debug, _opts.assert );
hand.init( _opts.debug, _opts.assert, _opts.silent );
var v = new HMR.verbs[ this.name() ]();
_out.init( _opts );
v.on( 'hmr:status', function() { _out.do.apply( _out, arguments ); });
@ -271,7 +277,7 @@ Definition of the `main` function.
logMsg(chalk.cyan('OPTIONS:') + '\n');
_.each(o, function(val, key) {
logMsg(chalk.cyan(' %s') + chalk.cyan.bold(' %s'),
PAD(key,17,null,PAD.RIGHT), val);
PAD(key,22,null,PAD.RIGHT), val);
});
logMsg('');
}