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

Tweak scroll sequences

parent 2dd105df
Showing with 5 additions and 3 deletions
+5 -3
......@@ -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) {
......
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