0.0.1 • Published 4 years ago

loggin-js-badges v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

cli-badges plugin for Loggin'JS npm.io

NPM version Downloads Dependencies Known Vulnerabilities
NPM quality


!! NOTICE !!

This plugin is still in it's early stages, and the API may change or have errors. If you find any errors or have sugestions please leave an issue


Table Of Content

Installing

  • Install with npm
npm install loggin-js-badges --save

Importing

// Require the logging library
const loggin = require('loggin-js');

// Require the express middleware
const logginBadges = require('loggin-js-badges');

Usage

// Register the plugin
loggin.use(logginBadges);

const logger = loggin.logger();

logger.badge('test', 'badge');

You can log to a specific notifier:

logger.badge.only('console', 'test', 'badge', { labelBg: 'red' });

Available Options

Check out docs for cli-badges here. Api is mostly the same.

OptionDescriptionTypeDefault
messageBgBackground color for the labelstring or numberblue
labelBgBackground color for the messagestring or numberblackBright
messageColorText color for the messagestring or numberwhite
labelColorText color for the labelstring or numberwhite
labelWidthWidth of the labelnumberlabel length + 2
messageWidthWidth of the messagenumberlabel length + 2
labelStyleStyle for the label textstringnull
messageStyleStyle for the label textstringnull
linkAdd a link when a badge is clicked (only works in some terminals, see this)URLnull
forceLinkForce adding link even if not supportedbooleanfalse

Found a bug?

If you found a bug or like to leave a feature request, please leave an issue and we will take care of it.

Just make sure it's not already filed.

Collaborating

Hi there, if you like the project don't hesitate in collaborating (if you like to), submit a pull request, post an issue, ...
Any help or ideas are apreciated!