Commit 801c2002 authored by Dan Abramov's avatar Dan Abramov
Browse files

Tweak scroll sequences

parent 2dd105df
No related merge requests found
Showing with 5 additions and 3 deletions
+5 -3
...@@ -69,10 +69,12 @@ function formatMessage(message) { ...@@ -69,10 +69,12 @@ function formatMessage(message) {
.replace('./~/css-loader!./~/postcss-loader!', ''); .replace('./~/css-loader!./~/postcss-loader!', '');
} }
var isFirstClear = true;
function clearConsole() { function clearConsole() {
// This seems to work best on Windows and other systems. // On first run, clear completely so it doesn't show half screen on Windows.
// The intention is to clear the output so you can focus on most recent build. // On next runs, use a different sequence that properly scrolls back.
process.stdout.write('\x1bc'); process.stdout.write(isFirstClear ? '\x1bc' : '\x1b[2J\x1b[0f');
isFirstClear = false;
} }
function setupCompiler(port, protocol) { function setupCompiler(port, protocol) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment