Badges creator
MIT License
Badges creator
npm i -S shieldman
'use strict'
const shieldman = require('shieldman')
const shield = shieldman('travis', { repo: 'zkochan/shieldman' })
console.log(shield)
//> { text: 'Build Status',
// link: 'https://travis-ci.org/zkochan/shieldman',
// image: 'https://img.shields.io/travis/zkochan/shieldman.svg' }
shieldman(service, [opts])
service
is a String representing the service for which the shield willopts.style
is the style of the shield. The available styles are: flat (theopts.repo
is the GitHub repo targeted by the shield. For the current repoKenanY/shields
.opts.branch
is the branch name for which the shield is created.opts.npmName
is the npm name of the package for which the shield isnpm
shield.The shieldman
function returns an Object obj
which has three keys:
obj.image
is a String link to the SVG of the shield for Stringservice
obj.link
is a String link to the project page of repo
on the websiteservice
obj.text
is a String label for the service