Code cleanup.

Use _.reduceRight in lieue of Array.prototype.reduce to ease logging
during resume merge and clean up code, comments, and whitespace
throughout.
This commit is contained in:
devlinjd committed 2015-10-07 03:53:38 -04:00
1 parent 7f930283c6
commit 11f76d920f
2 files changed
+24 -38

No files matched your search

-5
View File
@@ -9,22 +9,17 @@ var ARGS = require( 'minimist' )
, FCMD = require( './fluentcmd');
try {
console.log( '*** FluentCMD v0.1.0 ***' );
if( process.argv.length <= 2 ) { throw 'Please specify a JSON resume file.'; }
var args = ARGS( process.argv.slice(2) );
var src = args._.filter( function( a ) { return a.endsWith('.json'); });
var dst = args._.filter( function( a ) { return !a.endsWith('.json'); });
FCMD.generate( src, dst, args.t || 'informatic' );
process.platform !== 'win32' && console.log('\n');
}
catch( ex ) {
var msg = ex.toString();
var idx = msg.indexOf('Error: ');
var trimmed = idx === -1 ? msg : msg.substring( idx + 7 );
console.log( 'ERROR: ' + trimmed.toString() );
}