File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,15 @@ yargs.options({
8787 type : "boolean" ,
8888 describe : "Open default browser"
8989 } ,
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+ } ,
9099 "info" : {
91100 type : "boolean" ,
92101 group : DISPLAY_GROUP ,
@@ -257,7 +266,7 @@ function processOptions(wpOpt) {
257266 }
258267
259268 if ( typeof options . stats === "object" && typeof options . stats . colors === "undefined" )
260- options . stats . colors = require ( "supports- color" ) ;
269+ options . stats . colors = argv . color ;
261270
262271 if ( argv [ "lazy" ] )
263272 options . lazy = true ;
@@ -411,7 +420,7 @@ function startDevServer(wpOpt, options) {
411420}
412421
413422function reportReadiness ( uri , options ) {
414- var useColor = options . stats . colors ;
423+ var useColor = argv . color ;
415424 var startSentence = "Project is running at " + colorInfo ( useColor , uri )
416425 if ( options . socket ) {
417426 startSentence = "Listening to socket at " + colorInfo ( useColor , options . socket ) ;
You can’t perform that action at this time.
0 commit comments