Détail du package

cb-badges

bevry11MIT1.3.3

The definitive collection of badges for rendering

badges, badge, shields, shields.io

readme

badges

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Patreon donate button Flattr donate button Liberapay donate button Thanks App donate button Boost Lab donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

The definitive collection of badges for rendering

Install

npm

  • Install: npm install --save cb-badges
  • Require: require('cb-badges')

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/cb-badges'
</script>

This project provides its type information via inline JSDoc Comments. To make use of this in TypeScript, set your maxNodeModuleJsDepth compiler option to 5 or thereabouts. You can accomlish this via your tsconfig.json file like so:

{
  "compilerOptions": {
    "maxNodeModuleJsDepth": 5
  }
}

Usage

// Listing of badges to output
const list = [
  // Custom Badges
  ['badge', {image: 'image', alt: 'alt'}],
  ['badge', {image: 'image', alt: 'alt', url: 'url', title: 'title'}],
  ['shields', {left: 'left', right: 'right', alt: 'alt', url: 'url', title: 'title'}],
  ['shields', {left: 'left', right: 'right', color: 'red', alt: 'alt', url: 'url', title: 'title'}]
]

// Configuration for the badges
const config = {
}

// Options for rendering the badges
const options = {
    // Filter Category
    // When set to a string, will only render badges from the list that of the specified category
    // Values can be 'development', 'testing', 'funding', or 'social'
    // E.g. to render only funding badges, set to 'funding'
    filterCategory: false,

    // Filter Scripts
    // When true, do not render any badges from the list that are scripts
    filterScripts: false
}

// Render the badges to a string
const result = require('cb-badges').renderBadges(list, config, options)

// Output the result
console.log(result)

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

Contributors

These amazing people have contributed code to this project:

License

changelog

History

v1.3.2 2019 January 15

  • Updating docs

v1.3.1 2019 January 15

  • Updated To add target to links

v1.3.0 2018 December 19

v1.2.9 2018 November 23

  • Added support for travisTLD configuration option for the travisci badge
    • You can set it to com if you have migrated to travis-ci.com
    • Otherwise you can set it to org (the current default) if you are still on travis-org.com
    • The default will swap over once TravisCI has finished migrating all repositories to travis-ci.com
  • Updated base files using boundation

v1.2.8 2018 October 26

  • Added support for thanksappURL and thanksappUsername for the thanksapp badge

v1.2.7 2018 October 26

  • Added the crypto badge as a replacement for the bitcoin badge

v1.2.6 2018 October 26

  • Fixed the documentation params for the badges
  • Added the new funding badges from v1.2.5 to the readme

v1.2.5 2018 October 26

v1.2.4 2017 January 27

  • meta: update docs URL to not use https

v1.2.3 2017 January 27

  • meta: recompile

v1.2.2 2017 January 26

  • Added Open Collective badge
  • Added Code Climate Rating badge
  • Added BitHound Score badge
  • Fix the error TypeError: Cannot read property 'badgeScript' of undefined which appeared under certain circumstances

v1.2.1 2016 September 19

v1.2.0 2016 May 27

v1.1.2 2016 January 14

v1.1.1 2016 January 14

v1.1.0 2015 December 9

  • Updated internal conventions

v1.0.2 2015 September 18

v1.0.1 2015 September 16

  • Always use https

v1.0.0 2015 September 16