Skip to content

Commit

Permalink
fix(output): clear console on first start with --clear flag
Browse files Browse the repository at this point in the history
  • Loading branch information
wclr committed Oct 21, 2020
1 parent 1cb014d commit f3a34c7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const runDev = (
*/
let compileReqWatcher: chokidar.FSWatcher
function start() {
if (cfg.clear) process.stdout.write('\u001bc')
for (const watched of (opts.watch || '').split(',')) {
if (watched) watcher.add(watched)
}
Expand Down Expand Up @@ -220,9 +221,7 @@ export const runDev = (
compiler.init()
}
compiler.clearErrorCompile()

//if (cfg.clear) process.stdout.write("\u001b[2J\u001b[0;0H")
if (cfg.clear) process.stdout.write('\u001bc')

if (isManualRestart === true) {
notify('Restarting', 'manual restart from user')
} else {
Expand Down

0 comments on commit f3a34c7

Please # to comment.