Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
greg
4d1d2f8c52
|
1 year ago | |
---|---|---|
.. | ||
bin | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
index.js | 1 year ago | |
package.json | 1 year ago |
README.md
ansi-html
An elegant lib that converts the chalked (ANSI) text to HTML.
Coverage
Installation
$ npm install ansi-html-community
Usage
var ansiHTML = require('ansi-html-community');
var str = ansiHTML('[ANSI_TEXT]');
e.g.:
var chalk = require('chalk');
var str = chalk.bold.red('foo') + ' bar';
console.log('[ANSI]', str)
console.log('[HTML]', ansiHTML(str));
See complete examples under test
/ examples
directory.
Set Colors
ansiHTML.setColors({
reset: ['555', '666'], // FOREGROUND-COLOR or [FOREGROUND-COLOR] or [, BACKGROUND-COLOR] or [FOREGROUND-COLOR, BACKGROUND-COLOR]
black: 'aaa', // String
red: 'bbb',
green: 'ccc',
yellow: 'ddd',
blue: 'eee',
magenta: 'fff',
cyan: '999',
lightgrey: '888',
darkgrey: '777'
});
Reset
ansiHTML.reset();
Exposed Tags
var openTags = ansiHTML.tags.open;
var closeTags = ansiHTML.tags.close;
Test
$ npm install -l
$ npm test