From de73518235a512b7d39f4818836fe986917c6fcb Mon Sep 17 00:00:00 2001 From: Dvbnhbq Date: Mon, 21 Nov 2016 03:35:09 +0300 Subject: [PATCH] Add some original nodemon colour The 'log' event provides the original colour information stored in log.colour property, this can be used instead of log.message. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 8c6d152..03723da 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ module.exports = function (options) { // Forward log messages and stdin script.on('log', function (log){ - nodemonLog(log.message) + nodemonLog(log.colour) }) // Shim 'on' for use with gulp tasks @@ -94,5 +94,5 @@ module.exports = function (options) { } function nodemonLog(message){ - console.log('[' + new Date().toString().split(' ')[4].gray + '] ' + ('[nodemon] ' + message).yellow) + console.log('[' + new Date().toString().split(' ')[4].gray + '] ' + message) }