From 97b2df3335b4c96a8adceb57c5d6385e7ef6a5fb Mon Sep 17 00:00:00 2001 From: dhruvdutt Date: Tue, 27 Feb 2018 02:31:42 +0530 Subject: [PATCH] chore(refactor): update supports-color usage --- bin/process-options.js | 2 +- bin/webpack.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/process-options.js b/bin/process-options.js index 0b938f1669e..4975899a055 100644 --- a/bin/process-options.js +++ b/bin/process-options.js @@ -37,7 +37,7 @@ module.exports = function processOptions(yargs, argv) { }); if (typeof outputOptions.colors === "undefined") - outputOptions.colors = require("supports-color"); + outputOptions.colors = require("supports-color").stdout; ifArg("sort-modules-by", function(value) { outputOptions.modulesSort = value; diff --git a/bin/webpack.js b/bin/webpack.js index d6bce2dc530..26442739bea 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -80,7 +80,7 @@ type: "boolean", alias: "colors", default: function supportsColor() { - return require("supports-color"); + return require("supports-color").stdout; }, group: DISPLAY_GROUP, describe: "Enables/Disables colors on the console" @@ -318,7 +318,7 @@ }); if (typeof outputOptions.colors === "undefined") - outputOptions.colors = require("supports-color"); + outputOptions.colors = require("supports-color").stdout; ifArg("sort-modules-by", function(value) { outputOptions.modulesSort = value;