Skip to content

Commit c20e1a4

Browse files
committed
Merge pull request webpack#774 from Turbo87/colors
Use "supports-color" to detect if terminal supports colors
2 parents 13b6035 + f41cb3a commit c20e1a4

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

bin/webpack.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ ifArg("json", function(bool) {
7777
outputOptions.json = bool;
7878
});
7979

80-
ifArg("colors", function(bool) {
81-
outputOptions.colors = bool;
82-
});
80+
outputOptions.colors = require("supports-color");
8381

8482
ifArg("sort-modules-by", function(value) {
8583
outputOptions.modulesSort = value;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"webpack-core": "~0.4.8",
1616
"node-libs-browser": "~0.4.0",
1717
"watchpack": "^0.2.1",
18-
"tapable": "~0.1.8"
18+
"tapable": "~0.1.8",
19+
"supports-color": "^1.2.0"
1920
},
2021
"licenses": [
2122
{

0 commit comments

Comments
 (0)