Skip to content

Commit

Permalink
chore(refactor): update supports-color usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvdutt committed Mar 1, 2018
1 parent 4bf64bf commit 97b2df3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/process-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions bin/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 97b2df3

Please sign in to comment.