@netlify/plugin-lighthouse
Netlify Plugin to run Lighthouse on each build
Last updated 13 days ago by erezro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @netlify/plugin-lighthouse 
SYNC missed versions from official npm registry.

Netlify Plugin Lighthouse

A Netlify plugin to generate a lighthouse report for every deploy

Usage

This plugin can be included via npm. Install it as a dependency with the following command:

npm install --save "@netlify/plugin-lighthouse"

Add the plugin to your netlify.toml configuration file:

[[plugins]]
  package = "@netlify/plugin-lighthouse"

  # optional, fails build when a category is below a threshold
  [plugins.inputs.thresholds]
    performance = 0.9
    accessibility = 0.9
    best-practices = 0.9
    seo = 0.9
    pwa = 0.9

By default, the plugin will serve and audit the build directory of the site. You can customize the behavior via the audits input:

[[plugins]]
  package = "@netlify/plugin-lighthouse"

  [plugins.inputs.thresholds]
    performance = 0.9

  # to audit a sub path of the build directory
  # route1 audit will use the top level thresholds
  [[plugins.inputs.audits]]
    path = "route1"

  # to audit a specific absolute url
  [[plugins.inputs.audits]]
    url = "https://www.example.com"

    # you can specify thresholds per audit
    [plugins.inputs.audits.thresholds]
      performance = 0.8

Running Locally

Create a .env file based on the example and run

yarn install
yarn local

Current Tags

  • 1.4.0                                ...           latest (13 days ago)

10 Versions

  • 1.4.0                                ...           13 days ago
  • 1.3.2                                ...           21 days ago
  • 1.3.1                                ...           22 days ago
  • 1.3.0                                ...           23 days ago
  • 1.2.2                                ...           a month ago
  • 1.2.1                                ...           a month ago
  • 1.2.0                                ...           a month ago
  • 1.1.0                                ...           2 months ago
  • 1.0.1                                ...           2 months ago
  • 1.0.0                                ...           2 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 53
Dependencies (6)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |