From bece335a64ad1cfae60d7ce0b33748e87708e54d Mon Sep 17 00:00:00 2001 From: hacksalot Date: Sat, 9 Jan 2016 15:58:39 -0500 Subject: [PATCH] Fix CREATE verb output. --- src/out.js | 7 ++++--- src/verbs/create.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/out.js b/src/out.js index 99efb06..fd3912e 100644 --- a/src/out.js +++ b/src/out.js @@ -45,7 +45,7 @@ Output routines for HackMyResume. case HME.beforeCreate: this.log( chalk.green('Creating new ') + - chalk.green.bold(evt.cmd) + + chalk.green.bold(evt.fmt) + chalk.green(' resume: ') + chalk.green.bold(evt.file)); break; @@ -56,8 +56,8 @@ Output routines for HackMyResume. case HME.beforeMerge: var msg = ''; evt.f.reverse().forEach( function( a, idx ) { - msg += ((idx === 0) ? chalk.cyan('Merging ') : chalk.cyan(' onto ')) - + chalk.cyan.bold(a.i().file); + msg += ((idx === 0) ? chalk.cyan('Merging ') : + chalk.cyan(' onto ')) + chalk.cyan.bold(a.i().file); }); this.log( msg ); break; @@ -128,6 +128,7 @@ Output routines for HackMyResume. break; case HME.afterAnalyze: + // TODO: templatize all of this var info = evt.info; var padding = 20; this.log(chalk.cyan.bold('\nSECTIONS') + chalk.cyan(' (') + diff --git a/src/verbs/create.js b/src/verbs/create.js index 59ab3db..e26dfbb 100644 --- a/src/verbs/create.js +++ b/src/verbs/create.js @@ -44,11 +44,11 @@ Implementation of the 'create' verb for HackMyResume. _.each( src, function( t ) { 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; var RezClass = require('../core/' + safeFmt.toLowerCase() + '-resume' ); RezClass.default().save(t); - this.fireStat( HME.ac, { fmt: safeFmt, file: t } ); + this.stat( HME.afterCreate, { fmt: safeFmt, file: t } ); }, this); this.stat( HME.end );