lcov-badge-generator

js
Generate a badge from a lcov report
Version 1.0.5 License MIT
Keywords
lcovbadgecoveragetestcode coverageistanbulistanbul nycjest
No default JS file set by the package author so the URL is guessed. You can always browse all package files to use another one.
lcov badge generator
Most solutions use a 3rd party service to implement badges on their github page. This solutions generates the badge locally.
This does not utilize shields.io, and does not write to the readme file, however you only need to update the readme once since the file is generated locally, it will always reference the generated file.
Usage
Required
Path to report
lcov-badge-generator ./lcov.info
Optional
Output path
lcov-badge-generator -o ./coverage/badge-name.svg
defaults to ./badge.svg
Label
lcov-badge-generator -l code coverage
defaults to coverage
npm script
"coverage": "lcov-badge-generator -o ./badges/coverage.svg ./coverage/lcov.info
Yet to come
- Configure percentage thresholds