Skip to content

Commit a5aa563

Browse files
committed
chore: fix cli clearing
1 parent 9519252 commit a5aa563

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/pub.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import boxen from 'boxen'
44
import chokidar from 'chokidar'
5+
import readline from 'readline'
56
import k from 'kleur'
67
import { lookup } from 'mrmime'
78
import fs from 'node:fs'
@@ -17,8 +18,8 @@ const box = (...args) => console.log(boxen(...args))
1718
const pad = (msg) => msg.padEnd(4, ' ')
1819

1920
const clearLastLine = () => {
20-
process.stdout.moveCursor(0, -1) // up one line
21-
process.stdout.clearLine(1) // from cursor to end
21+
readline.cursorTo(process.stdout, 0, -1)
22+
readline.clearScreenDown(process.stdout)
2223
}
2324

2425
const readConfig = async (path) => {

0 commit comments

Comments
 (0)