Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/react-dev-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ clearConsole();
console.log('Just cleared the screen!');
```

This behavior can be disabled by setting the environment variable `REACT_APP_VERBOSE=1`.

#### `eslintFormatter(results: Object): string`

This is our custom ESLint formatter that integrates well with Create React App console output.<br>
Expand Down
4 changes: 4 additions & 0 deletions packages/react-dev-utils/clearConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
'use strict';

function clearConsole() {
if (process.env.REACT_APP_VERBOSE) {
return;
}

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

Expand Down