Skip to content

Commit

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

#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 gaearon committed Jan 9, 2018
1 parent e3e8cdd commit d3a1765
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 d3a1765

Please sign in to comment.