Skip to content

Commit

Permalink
Update the string that clears the console. (facebook#2071)
Browse files Browse the repository at this point in the history
* Update the string that clears the console.

facebook#1914
I've tested it with Windows 10 and 7, node versions from ~5.0.0 up to 7.7.0.
Didn't managed to test it on 8 but it should be fine.

* Update windows string

Add windows specific string for clearing the console.
  • Loading branch information
Daniel Verejan authored and Pavel Zhytko committed Jul 10, 2018
1 parent 11fa69f commit d726d22
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/react-dev-utils/clearConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
'use strict';

function clearConsole() {
process.stdout.write(
process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H'
);
process.stdout.write(process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H');
}

module.exports = clearConsole;

0 comments on commit d726d22

Please sign in to comment.