@codechecks/lighthouse-keeper
Version:
Keep an eye on Google Lighthouse score changes
85 lines (60 loc) • 2.23 kB
Markdown
<p align="center">
<h3 align="center">Lighthouse keeper</h3>
<p align="center">Keep an eye on Google Lighthouse score changes 💡👀</p>
<p align="center">
<a href="https://circleci.com/gh/codechecks/lighthouse-keeper"><img alt="Build Status" src="https://circleci.com/gh/codechecks/lighthouse-keeper/tree/master.svg?style=svg"></a>
<a href="/package.json"><img alt="Software License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"></a>
<a href="https://codechecks.io"><img src="https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true" alt="codechecks.io"></a>
</p>
</p>
```sh
npm install --save-dev @codechecks/lighthouse-keeper
```
Are you new to codechecks? Check out
[](https://github.com/codechecks/docs/blob/master/getting-started.md)!
Add to your `codechecks.yml` file:
```yml
checks:
- name: lighthouse-keeper
options:
buildPath: ./build
minScores:
performance: 90
```
```typescript
interface Options {
url?: string;
buildPath?: string;
minScores?: Dictionary<number>;
}
```
optional `string`<br> Provide URL that lighthouse will be ran against. `url` OR `buildPath` MUST be
provided.
optional `string`<br> Provide relative path to directory with build. It will be served using
`http-server` package and lighthouse will be ran against it. `url` OR `buildPath` MUST be provided.
optional `Dictionary of numbers`<br> Provide minimal scores for each metric. Possible keys are:
- performance
- accessibility
- best-practices
- seo
- pwa
All contributions are welcomed. Read more in [CONTRIBUTING.md](./CONTRIBUTING.md)
MIT @ [codechecks.io](https://codechecks.io)
Thanks go to @andreasonny83 for his support and creating the
[](https://github.com/andreasonny83/lighthouse-ci)