Miss any of our Open RFC calls?Watch the recordings here! »

@codechecks/lighthouse-keeper

0.1.2 • Public • Published

Lighthouse keeper

Keep an eye on Google Lighthouse score changes 💡👀

Build Status Software License codechecks.io

Install

npm install --save-dev @codechecks/lighthouse-keeper

Usage

Are you new to codechecks? Check out getting started guide (it's simple)!

Add to your codechecks.yml file:

checks:
  - name: lighthouse-keeper
    options:
      # just provide path to your build
      buildPath: ./build
      # or full url
      # url: https://google.com
      # you can specify minScores and automatically fail builds
      minScores:
        performance: 90
  # ...

API

lighthouseKeeper(options: Options): Promise<void>

options

interface Options {
  url?: string;
  buildPath?: string;
  minScores?: Dictionary<number>;
}
url

optional string
Provide URL that lighthouse will be ran against. url OR buildPath MUST be provided.

buildPath

optional string
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.

minScore

optional Dictionary of numbers
Provide minimal scores for each metric. Possible keys are:

  • performance
  • accessibility
  • best-practices
  • seo
  • pwa

Contributing

All contributions are welcomed. Read more in CONTRIBUTING.md

Licence

MIT @ codechecks.io

Acknowledges

Thanks go to @andreasonny83 for his support and creating the lighthouse-ci

Install

npm i @codechecks/lighthouse-keeper

DownloadsWeekly Downloads

123

Version

0.1.2

License

MIT

Unpacked Size

44.7 kB

Total Files

42

Last publish

Collaborators

  • avatar