@dannyxcii/badger
v0.5.0
Published
Badge generator for README files.
Downloads
4
Readme
Badger | JS Badge Generation Package
A package to easily generate badges for your Git repositories (like the ones above).
Installation
npm install --save-dev @dannyxcii/badger
Usage
To get started generating badges, add the required comment to the desired location in your projects README file. The necessary comment for each badge is listed below.
Badges
Jest Coverage
<!-- JS Coverage Badge -->
npx badger --jest ./path/to/coverage-final.json
Version
Accepts a valid package.json
or composer.json
filepath.
<!-- Version Badge -->
npx badger --version ./path/to/json
License
Accepts a valid package.json
or composer.json
filepath.
<!-- License Badge -->
npx badger --license ./path/to/json
PHPUnit Coverage
<!-- PHP Coverage Badge -->
<img src="https://img.shields.io/badge/PHP Coverage-7.04%25-red" alt="PHP Coverage 7.04%">
npx badger --phpunit ./path/to/coverage.xml
Additional Options
By default, Badger attempts to update ./README.md
- if your README file is located somewhere else you can pass the
--readme
flag along with any other flags:
npx badger --jest ./path/to/coverage --readme ./path/to/readme