Skip to content
Generate badges for your readme
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
img
lib
spec
.badge.json
.gitignore
.travis.yml
LICENSE
README.md
appveyor.yml
index.js
package.json
wercker.yml

README.md

generator-badge

travis status appveyor status wercker status wercker status
npm version npm license npm download npm download david dependency david dev-dependency
GitHub followers GitHub forks GitHub stars GitHub watchers GitHub issues

Generate badges for your readme

Installation

$ npm install --save --global generator-badge

Example

BEFORE

README.md:

# MY-AWESOME-PROJECT
<!-- badge -->
<!-- endbadge -->

THEN YOU DO

Terminal:

awesome-project$ badge install travis npm-version

WHAT YOU GET

README.md:

# MY-AWESOME-PROJECT
<!-- badge -->
[![travis](https://img.shields.io/travis/tanhauhau/awesome-project.svg)](https://travis-ci.org/tanhauhau/awesome-project)
[![npm-version](https://img.shields.io/npm/v/awesome-project.svg)](https://www.npmjs.com/package/awesome-project)
<!-- endbadge -->

Usage

Install badges

$ badge install <badges> [<args>]

You can specify required field values into arguments:

$ badge install travis --repo-username=tanhauhau --repo-name=awesome-project

For field values that is missing, badge will prompt you to enter.

install

*All the information gathered will be stored at .badge.json in the same folder as the nearest README.

Other options available

--no-cache
Do not use information stored in .badge.json.

--ignore-warning
Install badges even if some badges specified does not exists.

List of installed badge(s)

$ badge installed

List of all badges available

$ badge list <badges>

You can list all the badges available

$ badge list

listing

List of badges that will be installed

$ badge list <badges>

Example

$ badge list apm tavis

listing

Note typo in Travis. This command shows what will be installed, a typo in Tavis will install nothing

Help

$ badge help <badge>

help

Clear

$ badge clear

Remove all badges

Badges Available

See a list of badges available here.

Todo List

  • Find README of various format: markdown, textile, rdoc, rst, pod, html
  • Inferring git, svn repo information
  • Storing global preferences, eg: able to remember author name in global
  • Storing local preferences, eg: able to remember repo info in local package
  • Filename as argument
  • More badges available

Badge credits to

shields.io

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

You can’t perform that action at this time.