File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,15 @@ yargs.options({
87
87
type : "boolean" ,
88
88
describe : "Open default browser"
89
89
} ,
90
+ "color" : {
91
+ type : "boolean" ,
92
+ alias : "colors" ,
93
+ default : function supportsColor ( ) {
94
+ return require ( "supports-color" ) ;
95
+ } ,
96
+ group : DISPLAY_GROUP ,
97
+ describe : "Enables/Disables colors on the console"
98
+ } ,
90
99
"info" : {
91
100
type : "boolean" ,
92
101
group : DISPLAY_GROUP ,
@@ -257,7 +266,7 @@ function processOptions(wpOpt) {
257
266
}
258
267
259
268
if ( typeof options . stats === "object" && typeof options . stats . colors === "undefined" )
260
- options . stats . colors = require ( "supports- color" ) ;
269
+ options . stats . colors = argv . color ;
261
270
262
271
if ( argv [ "lazy" ] )
263
272
options . lazy = true ;
@@ -411,7 +420,7 @@ function startDevServer(wpOpt, options) {
411
420
}
412
421
413
422
function reportReadiness ( uri , options ) {
414
- var useColor = options . stats . colors ;
423
+ var useColor = argv . color ;
415
424
var startSentence = "Project is running at " + colorInfo ( useColor , uri )
416
425
if ( options . socket ) {
417
426
startSentence = "Listening to socket at " + colorInfo ( useColor , options . socket ) ;
You can’t perform that action at this time.
0 commit comments