Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
5c551f8d
Commit
5c551f8d
authored
8 years ago
by
Dan Abramov
Committed by
GitHub
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Use a better clear console sequence (#1211)
parent
a60140f8
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/clearConsole.js
+1
-5
packages/react-dev-utils/clearConsole.js
with
1 addition
and
5 deletions
+1
-5
packages/react-dev-utils/clearConsole.js
+
1
-
5
View file @
5c551f8d
...
...
@@ -7,12 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
var
isFirstClear
=
true
;
function
clearConsole
()
{
// 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
;
process
.
stdout
.
write
(
process
.
platform
===
'
win32
'
?
'
\
x1Bc
'
:
'
\
x1B[2J
\
x1B[3J
\
x1B[H
'
);
}
module
.
exports
=
clearConsole
;
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets