1.0.0 • Published 4 years ago
terminal-styles v1.0.0
terminal-styles
Terminal styling using ES6 tagged template literals.
terminal-styles
tries to be the sane alternative to template-colors
, using only ansi-styles
under the hood.
Bundled with browserify, terminal-styles
has roughly 100 LOC, whereas template-colors
has roughly 2000 LOC.
Installing
npm install terminal-styles
Usage
styles.x
works like a closing tag.
const styles = require('terminal-styles')
const {blue, red, underline, x} = styles
console.log(styles `${blue}foo ${red}bar ${underline}baz${x} qux${x} qax${x}`)
You can use all colors & modifiers from ansi-styles
, except reset
and inverse
.
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.