A useful wrapper around Google Lighthouse CLI
$ npm install -g lighthouse-ci
lighthouse-ci --help
$ lighthouse-ci --help
Usage
$ lighthouse-ci <target-url>
Example
$ lighthouse-ci https://example.com/
$ lighthouse-ci -s https://example.com/
$ lighthouse-ci https://example.com/ --score=75
$ lighthouse-ci https://example.com/ --accessibility=90 --seo=80
Options
--report=<path> Generate an HTML report inside a specified folder
-s, --silent Run Lighthouse without printing report log.
--score=<threshold> Specify a score threshold for the CI to pass.
--performance=<threshold> Specify a minimal performance score for the CI to pass.
--pwa=<threshold> Specify a minimal pwa score for the CI to pass.
--accessibility=<threshold> Specify a minimal accessibility score for the CI to pass.
--best-practice=<threshold> [DEPRECATED] Use best-practices instead.
--best-practices=<threshold> Specify a minimal best-practice score for the CI to pass.
--seo=<threshold> Specify a minimal seo score for the CI to pass.
In addition to listed lighthouse-ci
configuration flags, it is also possible to pass any native lighthouse
flags.
To see the full list of available flags, please refer to the official Google Lighthouse documentation.
eg.
$ lighthouse-ci --emulated-form-factor desktop --seo 92
Thanks goes to these wonderful people (emoji key):
Andrea Sonny ๐ฌ ๐ป ๐ |
Celso Santa Rosa ๐ป |
Ben Hammond ๐ ๐ป |
Alex Tenepere ๐ ๐ป |
Connor Markwell ๐ ๐ป |
Michael Griffiths ๐ป |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT
Created with ๐ฆ by andreasonny83