Skip to content
/ colorce Public

Node.js terminal highlighting as simple as it should be.

License

Notifications You must be signed in to change notification settings

vimtor/colorce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

colorce

Terminal highlighting as simple as it should be.

Console Color

Install

$ npm install colorce

Usage

Simply import and invoke the module at the top of your main script.

require('colorce')();

console.error('This is an error'); // Already works!

You can also customize the looks by using known packages such as chalk or colors.js

const chalk = require('chalk');
const colors = require('colors');

require('colorce')({
    log: chalk.hex('#DEADED').bold,
    info: chalk.blue,
    warn: chalk.white.bgYellow,
    error: colors.red,
    success: colors.green.underline
});

If you want to disable color you can pass the following arguments to your application.

$ node app.js --no-color

About

Node.js terminal highlighting as simple as it should be.

Resources

License

Stars

Watchers

Forks

Packages

No packages published