Table Of Contents
Getting Started
Installing
As usual, you need to install from npm/yarn:
$ npm install cli-badges
Usage
This is a simple example, using badges to display test results:
const { badge } = require('cli-badges');
const failedBadge = badge('failed', '2', { theme: 'red' });
const skippedBadge = badge.yellow('skipped', '2');
const successBadge = badge.green('success', '2');
console.log(failedBadge, successBadge, skippedBadge);
The above would output something similar to the terminal:
You could also create a donate badge with a link (if supported):
const donateBadge = badge.blue('❤️ donate',
…