From 6ea12a74c235be796ee7992b3b702e83ff85db12 Mon Sep 17 00:00:00 2001 From: Daniel Verejan Date: Wed, 3 May 2017 12:02:10 +0300 Subject: [PATCH 1/2] 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. --- packages/react-dev-utils/clearConsole.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-dev-utils/clearConsole.js b/packages/react-dev-utils/clearConsole.js index 05ab28c44d2..0542a3be1dd 100644 --- a/packages/react-dev-utils/clearConsole.js +++ b/packages/react-dev-utils/clearConsole.js @@ -10,9 +10,7 @@ 'use strict'; function clearConsole() { - process.stdout.write( - process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H' - ); + process.stdout.write('\x1B[2J\x1B[3J\x1B[H'); } module.exports = clearConsole; From 751fe4cb886c0fe81741bffa816d86ff25f39dca Mon Sep 17 00:00:00 2001 From: Daniel Verejan Date: Fri, 12 May 2017 10:35:01 +0300 Subject: [PATCH 2/2] Update windows string Add windows specific string for clearing the console. --- packages/react-dev-utils/clearConsole.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-dev-utils/clearConsole.js b/packages/react-dev-utils/clearConsole.js index 0542a3be1dd..bb487d27c50 100644 --- a/packages/react-dev-utils/clearConsole.js +++ b/packages/react-dev-utils/clearConsole.js @@ -10,7 +10,7 @@ 'use strict'; function clearConsole() { - process.stdout.write('\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;