1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-22 08:20:11 +00:00

Fix CREATE verb output.

This commit is contained in:
hacksalot 2016-01-09 15:58:39 -05:00
parent 3aabb5028d
commit bece335a64
2 changed files with 6 additions and 5 deletions

View File

@ -45,7 +45,7 @@ Output routines for HackMyResume.
case HME.beforeCreate: case HME.beforeCreate:
this.log( chalk.green('Creating new ') + this.log( chalk.green('Creating new ') +
chalk.green.bold(evt.cmd) + chalk.green.bold(evt.fmt) +
chalk.green(' resume: ') + chalk.green.bold(evt.file)); chalk.green(' resume: ') + chalk.green.bold(evt.file));
break; break;
@ -56,8 +56,8 @@ Output routines for HackMyResume.
case HME.beforeMerge: case HME.beforeMerge:
var msg = ''; var msg = '';
evt.f.reverse().forEach( function( a, idx ) { evt.f.reverse().forEach( function( a, idx ) {
msg += ((idx === 0) ? chalk.cyan('Merging ') : chalk.cyan(' onto ')) msg += ((idx === 0) ? chalk.cyan('Merging ') :
+ chalk.cyan.bold(a.i().file); chalk.cyan(' onto ')) + chalk.cyan.bold(a.i().file);
}); });
this.log( msg ); this.log( msg );
break; break;
@ -128,6 +128,7 @@ Output routines for HackMyResume.
break; break;
case HME.afterAnalyze: case HME.afterAnalyze:
// TODO: templatize all of this
var info = evt.info; var info = evt.info;
var padding = 20; var padding = 20;
this.log(chalk.cyan.bold('\nSECTIONS') + chalk.cyan(' (') + this.log(chalk.cyan.bold('\nSECTIONS') + chalk.cyan(' (') +

View File

@ -44,11 +44,11 @@ Implementation of the 'create' verb for HackMyResume.
_.each( src, function( t ) { _.each( src, function( t ) {
var safeFmt = opts.format.toUpperCase(); var safeFmt = opts.format.toUpperCase();
this.fireStat( HME.bc, { fmt: safeFmt, file: t } ); this.stat( HME.beforeCreate, { fmt: safeFmt, file: t } );
MKDIRP.sync( PATH.dirname( t ) ); // Ensure dest folder exists; MKDIRP.sync( PATH.dirname( t ) ); // Ensure dest folder exists;
var RezClass = require('../core/' + safeFmt.toLowerCase() + '-resume' ); var RezClass = require('../core/' + safeFmt.toLowerCase() + '-resume' );
RezClass.default().save(t); RezClass.default().save(t);
this.fireStat( HME.ac, { fmt: safeFmt, file: t } ); this.stat( HME.afterCreate, { fmt: safeFmt, file: t } );
}, this); }, this);
this.stat( HME.end ); this.stat( HME.end );