Skip to content

Commit d726d22

Browse files
Daniel VerejanPavel Zhytko
Daniel Verejan
authored and
Pavel Zhytko
committed
Update the string that clears the console. (facebook#2071)
* 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.
1 parent 11fa69f commit d726d22

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/react-dev-utils/clearConsole.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
'use strict';
99

1010
function clearConsole() {
11-
process.stdout.write(
12-
process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H'
13-
);
11+
process.stdout.write(process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H');
1412
}
1513

1614
module.exports = clearConsole;

0 commit comments

Comments
 (0)