mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-15 10:07:07 +01:00
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:
@ -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() );
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user