quick-badge-generator
A simple API to generate badges for your GitHub Projects!
Install
$ npm install --save quick-badge-generator
Usage
'use strict'; const qbg = ; ; /*{ default: 'https://img.shields.io/badge/build-passing-green.svg', plastic: 'https://img.shields.io/badge/build-passing-green.svg?style=plastic', flat: 'https://img.shields.io/badge/build-passing-green.svg?style=flat', flatSquared: 'https://img.shields.io/badge/build-passing-green.svg?style=flat-square', social: 'https://img.shields.io/badge/build-passing-green.svg?style=social'}*/ const prop = ; console; // => https://img.shields.io/badge/build-failing-red.svg
API
The default parameter for status
and color
are optional
as they are replaced by unknown
and lightgrey
respectively when the value aren't provided!
qbg('subject', 'status', 'color')
subject
TYPE
:
string
status
TYPE
:
string
color
TYPE
:
string
You can only use the following colors in your badge :
brightgree
green
yellowgreen
yellow
orange
red
lightgrey
blue
STYLES
There are four styles available :
plastic
flat
flatSquare
social
You can exract the required style using :
const styles = ; console// => 'https://img.shields.io/badge/build-passing-green.svg?style=plastic'console// => 'https://img.shields.io/badge/build-passing-green.svg?style=flat'console// => 'https://img.shields.io/badge/build-passing-green.svg?style=flat-square'console// => 'https://img.shields.io/badge/build-passing-green.svg?style=social'
Related
Quick Badge Link
:Generate links to pixel-perfect, retina-ready, fast, and consistent badges for your projects!
License
MIT © Rishi Giri