From 032a8946565f8efbce488843e3066e20db546053 Mon Sep 17 00:00:00 2001 From: Brittney Postma Date: Mon, 31 Oct 2022 11:25:54 -0400 Subject: [PATCH 1/2] Update README.md I did not see the configuration options for failing builds based on score thresholds in the README. Since this is the main documentation for the plugin, I took the liberty of making a pr for updating it. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d273cd71..14e5304f 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,18 @@ Updates to `netlify.toml` will take effect for new builds. locale = "es" # generates Lighthouse reports in EspaƱol ``` +### Fail Builds Based on Score Thresholds + +By default, the Lighthouse will just report finding. To fail a build based on the findings, specify the inputs threasholds in your `netlify.toml` file. + +```toml +[[plugins]] + package = "@netlify/plugin-lighthouse" + + [plugins.inputs.thresholds] + performance = 0.9 +``` + ### Run Lighthouse Locally Fork and clone this repo. From 049f1e19d901936bb1017c53a782175f42b93813 Mon Sep 17 00:00:00 2001 From: Brittney Postma Date: Mon, 31 Oct 2022 14:37:34 -0400 Subject: [PATCH 2/2] Update README.md Fixed typos and added options. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 14e5304f..cd0d754b 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Updates to `netlify.toml` will take effect for new builds. ### Fail Builds Based on Score Thresholds -By default, the Lighthouse will just report finding. To fail a build based on the findings, specify the inputs threasholds in your `netlify.toml` file. +By default, the Lighthouse plugin will report the findings in the deploy logs. To fail a build based on a specific score, specify the inputs thresholds in your `netlify.toml` file. Set the threshold based on `performance`, `accessibility`, `best-practices`, `seo`, or `pwa`. ```toml [[plugins]]