Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

Commit fc1da86

Browse files
committed
feat(startYarn): clear previous spinner line on browserSync output
1 parent 989f98a commit fc1da86

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/start/yarn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function notify(stdout, stderr) {
6161
const onBrowserSync = (0, _through2Filter2.default)({ wantStrings: true }, function (chunk) {
6262
const strippedChunk = (0, _stripAnsi2.default)(chunk);
6363
if (_lodash2.default.startsWith(strippedChunk, '[BS]')) {
64-
(0, _log2.default)('');
64+
process.stdout.clearLine();
65+
process.stdout.cursorTo(0);
6566
activated = true;
6667
} else if (activated && _lodash2.default.startsWith(strippedChunk, '[')) {
6768
activated = false;

src/start/yarn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function notify (stdout, stderr) {
3939
const onBrowserSync = streamFilter({wantStrings: true}, function (chunk) {
4040
const strippedChunk = stripAnsi(chunk)
4141
if (_.startsWith(strippedChunk, '[BS]')) {
42-
log('')
42+
process.stdout.clearLine()
43+
process.stdout.cursorTo(0)
4344
activated = true
4445
} else if (activated && _.startsWith(strippedChunk, '[')) {
4546
activated = false

0 commit comments

Comments
 (0)