generator-badges

1.0.0 • Public • Published

generator-badges

NPM version Build Status Coveralls Status Dependency Status DevDependency Status

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 version
  • npm — NPM version
  • travis — Travis CI
  • coveralls — coveralls.io
  • dependencies — dependency status
  • devDependencies — devDependency status
  • codeship — codeship build status
  • scrutinizer — scrutinizer code quality
  • werckerwercker.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

Package Sidebar

Install

npm i generator-badges

Weekly Downloads

10

Version

1.0.0

License

MIT

Last publish

Collaborators

  • greybax