A simple npm package to generate gh-badges (shields.io) based on lighthouse performance.
10K+
This package allows you to easily create Lighthouse badges for all Lighthouse categories.
Ever wanted to brag about your sites's awesome Lighthouse performance? Then this is the package for you!
usage: lighthouse-badges [-h] [-v] [-s] [-b {flat,flat-square,plastic}] [-r]
-u URLS [URLS ...]
Generate gh-badges (shields.io) based on lighthouse
performance.
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-s, --single-badge Output only one single badge averaging all
lighthouse categories' scores
-b {flat,flat-square,plastic}, --badge-style {flat,flat-square,plastic}
Define look and feel for the badge
-r, --save-report Save lighthouse report as html for every supplied url
Required arguments:
-u URLS [URLS ...], --urls URLS [URLS ...]
The lighthouse badge(s) will contain the respective
average score(s) of all the urls supplied, combined
# Using npm
npm i -g lighthouse-badges
# The badges will be saved in your current directory
lighthouse-badges --urls https://www.youtube.com/ https://www.youtube.com/feed/trending
# Using Docker
docker pull emazzotta/lighthouse-badges
# Replace $(pwd) with the report/svg save path on your host
docker run -v $(pwd):/home/chrome/reports emazzotta/lighthouse-badges /bin/sh -c "lighthouse-badges --urls https://www.youtube.com/ https://www.youtube.com/feed/trending"
Emanuele Mazzotta
Content type
Image
Digest
sha256:a7ccbf978…
Size
360.2 MB
Last updated
3 days ago
docker pull emazzotta/lighthouse-badges