This repository was archived by the owner on Sep 12, 2019. It is now read-only.
File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 39
39
"resolve" : " ^1.10.0" ,
40
40
"safe-join" : " ^0.1.2" ,
41
41
"static-server" : " ^2.2.1" ,
42
+ "strip-ansi" : " ^5.2.0" ,
42
43
"wait-port" : " ^0.2.2" ,
43
44
"wrap-ansi" : " ^5.1.0"
44
45
},
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const httpProxy = require("http-proxy");
5
5
const waitPort = require ( "wait-port" ) ;
6
6
const getPort = require ( "get-port" ) ;
7
7
const chokidar = require ( "chokidar" ) ;
8
+ const stripAnsi = require ( "strip-ansi" )
8
9
const { serveFunctions } = require ( "../../utils/serve-functions" ) ;
9
10
const { serverSettings } = require ( "../../detect-server" ) ;
10
11
const { detectFunctionsBuilder } = require ( "../../detect-functions-builder" ) ;
@@ -160,6 +161,12 @@ function startDevServer(settings, log) {
160
161
const ps = execa ( settings . command , args , {
161
162
env : settings . env ,
162
163
} ) ;
164
+ ps . stdout . on ( 'data' , function ( buffer ) {
165
+ process . stdout . write ( stripAnsi ( buffer . toString ( 'utf8' ) ) )
166
+ } )
167
+ ps . stderr . on ( 'data' , function ( buffer ) {
168
+ process . stderr . write ( stripAnsi ( buffer . toString ( 'utf8' ) ) )
169
+ } )
163
170
ps . on ( "close" , code => process . exit ( code ) ) ;
164
171
ps . on ( "SIGINT" , process . exit ) ;
165
172
ps . on ( "SIGTERM" , process . exit ) ;
You can’t perform that action at this time.
0 commit comments