GitXplorerGitXplorer
t

brighten

public
10 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
2d53b373f765f682795ba3eefcaaa869219f46c8

Syntax highlighting

ttimneutkens committed 7 years ago
Unverified
e3e93c30942ed71cfa3a724ae0eb461e2a08f721

Bigger logo

ttimneutkens committed 7 years ago
Unverified
b1497c87b605349036e68bba3ef297cae14c6899

Initial commit

ttimneutkens committed 7 years ago

README

The README file for this repository.

Brighten

Clear terminal screen but keep output history.

History

While working on friendly-errors-webpack-plugin to improve it for Next.js, I needed to clear the terminal screen without overriding previous output. Using ANSI escapes works for clearing the screen, but it will also override the output that's visible at that moment. So I created this simple solution to clear the screen but keep the history

Installation

npm install --save brighten

Usage

const brighten = require('brighten')

// clear screen when process is a TTY
if(process.stdout.isTTY) {
  brighten()
}