https://github.com/vimtor/colorce
Node.js terminal highlighting as simple as it should be.
https://github.com/vimtor/colorce
Last synced: 10 months ago
JSON representation
Node.js terminal highlighting as simple as it should be.
- Host: GitHub
- URL: https://github.com/vimtor/colorce
- Owner: vimtor
- License: mit
- Created: 2019-07-26T10:28:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T19:27:11.000Z (over 6 years ago)
- Last Synced: 2025-04-10T19:42:42.574Z (10 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# colorce
Terminal highlighting as simple as it should be.

## Install
```
$ npm install colorce
```
## Usage
Simply import and invoke the module at the top of your main script.
```js
require('colorce')();
console.error('This is an error'); // Already works!
```
You can also customize the looks by using known packages such as [chalk](https://www.npmjs.com/package/chalk) or [colors.js](https://www.npmjs.com/package/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.
```js
$ node app.js --no-color
```