From 6801e39f97ac0a4f8a2a90854a724bf18e0b5180 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Fri, 22 Jan 2016 04:55:29 -0500 Subject: [PATCH] Tweak output colorization. --- src/cli/out.js | 9 ++++++--- src/utils/md2chalk.js | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/cli/out.js b/src/cli/out.js index 797463e..5d25523 100644 --- a/src/cli/out.js +++ b/src/cli/out.js @@ -83,7 +83,10 @@ Output routines for HackMyResume. break; case HME.afterParse: - L( M2C( this.msgs.afterRead.msg, 'green' ), evt.fmt.toUpperCase(), evt.file ); + L( + M2C( this.msgs.afterRead.msg, 'gray', 'white.dim'), evt.fmt.toUpperCase(), evt.file + ); + break; case HME.afterTheme: @@ -107,7 +110,7 @@ Output routines for HackMyResume. case HME.applyTheme: this.theme = evt.theme; var numFormats = Object.keys( evt.theme.formats ).length; - L( M2C(this.msgs.applyTheme.msg, evt.status === 'error' ? 'red' : 'green'), + L( M2C(this.msgs.applyTheme.msg, evt.status === 'error' ? 'red' : 'gray', evt.status === 'error' ? 'bold' : 'white.dim'), evt.theme.name.toUpperCase(), numFormats, ( numFormats === 1 ? '' : 's') ); break; @@ -172,7 +175,7 @@ Output routines for HackMyResume. break; case HME.afterInlineConvert: - L( M2C( this.msgs.afterInlineConvert.msg, 'green'), + L( M2C( this.msgs.afterInlineConvert.msg, 'gray', 'white.dim' ), evt.file, evt.fmt ); break; diff --git a/src/utils/md2chalk.js b/src/utils/md2chalk.js index 02b70a0..eeef962 100644 --- a/src/utils/md2chalk.js +++ b/src/utils/md2chalk.js @@ -10,9 +10,10 @@ Inline Markdown-to-Chalk conversion routines. var CHALK = require('chalk'); var LO = require('lodash'); - module.exports = function( v, style ) { - var temp = v.replace(/\*\*(.*?)\*\*/g, CHALK.bold('$1')); - return style ? LO.get(CHALK, style)(temp) : temp; + module.exports = function( v, style, boldStyle ) { + boldStyle = boldStyle || 'bold'; + var temp = v.replace(/\*\*(.*?)\*\*/g, LO.get( CHALK, boldStyle )('$1')); + return style ? LO.get( CHALK, style )(temp) : temp; }; }());