generator-badges
v1.0.0
Published
Yeoman generator for adding badges to your README.md
Downloads
17
Readme
generator-badges
Yeoman generator for adding badges to your README.md Works great as cli and with other generators too.
Install
npm install --global yo generator-badges
Usage
yo badges noPrompts -u i-am-user -p my-awesome-project -b travis,npm
This command creates README.md
(if doesn't exist) or created one and put there follow rows on the top:
[![Build Status][travis-image]][travis-url]
[travis-url]: https://travis-ci.org/i-am-user/my-awesome-project
[travis-image]: https://img.shields.io/travis/i-am-user/my-awesome-project/master.svg?style=flat-square
[![NPM version][npm-image]][npm-url]
[npm-url]: https://npmjs.org/package/my-awesome-project
[npm-image]: https://img.shields.io/npm/v/my-awesome-project.svg?style=flat-square
OR
you can use prompt
mode:
yo badge
Now supports follow badges in options:
appveyor
— NPM versionnpm
— NPM versiontravis
— Travis CIcoveralls
— coveralls.iodependencies
— dependency statusdevDependencies
— devDependency statuscodeship
— codeship build statusscrutinizer
— scrutinizer code qualitywercker
— wercker.com
Composability
Composability is a way to combine smaller parts to make one large thing. Sort of like Voltron®
— Yeoman docs
Just plug in for generates badges into your README.md into your generator.
Install
npm install --save generator-badges
Compose
this.composeWith('badges', { options: {
'skip-install': this.options['skip-install'],
config: {
user: "i-am-user",
project: "my-awesome-project",
badges: ['travis', 'npm']
}}}, {
local: require.resolve('generator-badges')
});
License
MIT © Aleksandr Filatov alfilatov.com