From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/fancy-log/index.js | 25 +++++++++++++++++++++++-- node_modules/fancy-log/package.json | 5 +++-- 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'node_modules/fancy-log') diff --git a/node_modules/fancy-log/index.js b/node_modules/fancy-log/index.js index 12df5c34c..c78eb45c8 100644 --- a/node_modules/fancy-log/index.js +++ b/node_modules/fancy-log/index.js @@ -2,11 +2,32 @@ /* Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js */ -var chalk = require('chalk'); +var gray = require('ansi-gray'); var timestamp = require('time-stamp'); +var supportsColor = require('color-support'); + +function hasFlag(flag) { + return (process.argv.indexOf('--' + flag) !== -1); +} + +function addColor(str) { + if (hasFlag('no-color')) { + return str; + } + + if (hasFlag('color')) { + return gray(str); + } + + if (supportsColor()) { + return gray(str); + } + + return str; +} function getTimestamp(){ - return '['+chalk.grey(timestamp('HH:mm:ss'))+']'; + return '['+addColor(timestamp('HH:mm:ss'))+']'; } function log(){ diff --git a/node_modules/fancy-log/package.json b/node_modules/fancy-log/package.json index 063c4c66d..eefb66996 100644 --- a/node_modules/fancy-log/package.json +++ b/node_modules/fancy-log/package.json @@ -1,6 +1,6 @@ { "name": "fancy-log", - "version": "1.3.0", + "version": "1.3.2", "description": "Log things, prefixed with a timestamp", "author": "Blaine Bublitz ", "contributors": [ @@ -20,7 +20,8 @@ "test": "lab -cvL test.js" }, "dependencies": { - "chalk": "^1.1.1", + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", "time-stamp": "^1.0.0" }, "devDependencies": { -- cgit v1.2.3