1
0
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:
devlinjd
2015-10-07 03:53:38 -04:00
parent 7f930283c6
commit 11f76d920f
2 changed files with 24 additions and 38 deletions

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() );
}