Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

lighthouse-ci

1.3.0 • Public • Published

Lighthouse CI

All Contributors npm version npm Known Vulnerabilities Commitizen friendly XO code style

A useful wrapper around Google Lighthouse CLI

Lighthouse CI logo

Install

$ npm install -g lighthouse-ci

Table of Contents

Usage

lighthouse-ci --help

CLI

$ 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.

Lighthouse flags

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 Gloogle Lighthouse documentation.

eg.

$ lighthouse-ci --emulated-form-factor desktop --seo 92

Contributors

Thanks goes to these wonderful people (emoji key):


Andrea Sonny

💬 💻 📖

Celso Santa Rosa

💻

Ben Hammond

🐛 💻

Alex Tenepere

🐛 💻

Connor Markwell

🐛 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT


Created with 🦄 by andreasonny83

install

npm i lighthouse-ci

Downloadsweekly downloads

1,153

version

1.3.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability