diff --git a/scripts/start.js b/scripts/start.js index 84d1e7c4b48d11ed7e95c1febaf97273ab3338f4..c285dc50e32452dcff732c4a7062c516990ae5b3 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -69,10 +69,12 @@ function formatMessage(message) { .replace('./~/css-loader!./~/postcss-loader!', ''); } +var isFirstClear = true; function clearConsole() { - // This seems to work best on Windows and other systems. - // The intention is to clear the output so you can focus on most recent build. - process.stdout.write('\x1bc'); + // On first run, clear completely so it doesn't show half screen on Windows. + // On next runs, use a different sequence that properly scrolls back. + process.stdout.write(isFirstClear ? '\x1bc' : '\x1b[2J\x1b[0f'); + isFirstClear = false; } function setupCompiler(port, protocol) {