Skip to content

Instantly share code, notes, and snippets.

@kahunacohen
Created October 29, 2018 09:18
Show Gist options
  • Save kahunacohen/4f2bbfd78aa2d7dc1d9f71a8237645b3 to your computer and use it in GitHub Desktop.
Save kahunacohen/4f2bbfd78aa2d7dc1d9f71a8237645b3 to your computer and use it in GitHub Desktop.
Custom Google Lighthouse config file for NCBI written audits
"use strict";
module.exports = {
// 1. Run your custom tests along with all the default Lighthouse tests.
extends: "lighthouse:default",
// 2. Add gatherer to the default Lighthouse load ('pass') of the page.
passes: [
{
passName: "defaultPass",
gatherers: ["links-in-buttons-gatherer", "ncbi_app-gatherer"]
}
],
// 3. Add custom audit to the list of audits 'lighthouse:default' will run.
audits: ["links-in-buttons-audit", "ncbi_app-audit"],
// 4. Create a new 'My site metrics' section in the default report for our results.
categories: {
ncbi: {
title: "NCBI Audits",
description: "Audits specific to NCBI",
auditRefs: [
// When we add more custom audits, `weight` controls how they're averaged together.
{ id: "links-in-buttons-audit", weight: 1 },
{ id: "ncbi_app-audit", weight: 1 }
]
}
}
};
@patrickhulce
Copy link

this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment