Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit 037bd17

Browse files
committed
Revert: "Remove strip-ansi"
1 parent f6118eb commit 037bd17

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"resolve": "^1.10.0",
4040
"safe-join": "^0.1.2",
4141
"static-server": "^2.2.1",
42+
"strip-ansi": "^5.2.0",
4243
"wait-port": "^0.2.2",
4344
"wrap-ansi": "^5.1.0"
4445
},

src/commands/dev/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const httpProxy = require("http-proxy");
55
const waitPort = require("wait-port");
66
const getPort = require("get-port");
77
const chokidar = require("chokidar");
8+
const stripAnsi = require("strip-ansi");
89
const { serveFunctions } = require("../../utils/serve-functions");
910
const { serverSettings } = require("../../detect-server");
1011
const { detectFunctionsBuilder } = require("../../detect-functions-builder");
@@ -162,10 +163,10 @@ function startDevServer(settings, log) {
162163
stdio: ["inherit", "pipe", "pipe"]
163164
});
164165
ps.stdout.on("data", function(buffer) {
165-
process.stdout.write(buffer.toString("utf8"));
166+
process.stdout.write(stripAnsi(buffer.toString("utf8")));
166167
});
167168
ps.stderr.on("data", function(buffer) {
168-
process.stderr.write(buffer.toString("utf8"));
169+
process.stderr.write(stripAnsi(buffer.toString("utf8")));
169170
});
170171
ps.on("close", code => process.exit(code));
171172
ps.on("SIGINT", process.exit);

0 commit comments

Comments
 (0)