0.1.1 • Published 5 years ago

cli-style v0.1.1

Weekly downloads
35
License
MIT
Repository
github
Last release
5 years ago

cli-style

A simple tool allows you to set styles to command line output more easier.

Installation

$ npm i cli-style --save

Usage

This gadget is based on chalk, and color, bgcolor|bg, underline, bold, italic, strikethrough, dim can be used as options in cli-style, but only HEX and Keyword color modes can be used.

const style = require( 'cli-style' );

const styles = [ {
    color : 'red',
    bg : 'white',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true
}, {
    color : 'red',
    bg : 'white',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : '#FF0000',
    bg : '#FFFFFF',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : 'rgb( 123, 24, 64 )',
    bg : 'hsl( 32, 100, 50 )',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : 'hsv(32, 100, 100)',
    bg : 'hwb(32, 0, 50)',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
} ];

for( const item of styles ) {
    console.log( style( JSON.stringify( item ), item ) );
}
0.1.0

5 years ago

0.1.1

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago