terminal-styles

1.0.0 • Public • Published

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.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me on Patreon

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.

Package Sidebar

Install

npm i terminal-styles

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

4.82 kB

Total Files

4

Last publish

Collaborators

  • derhuerst