Skip to content

Instantly share code, notes, and snippets.

@hereswhatidid hereswhatidid/
Last active Feb 18, 2019

What would you like to do?
Run lighthouse from a bashrc function. ex: "lh"
lh() {
lighthouse "$1" --view --chrome-flags="--headless" --config-path="$HOME/lighthouse-config.js"
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyCategories: ['performance', 'best-practices'] // 'performance', 'accessibility', 'best-practices', 'seo', 'pwa'

This comment has been minimized.

Copy link
Owner Author

hereswhatidid commented Feb 18, 2019

Add the code to your .bashrc file. You can replace the name of the function with whatever you'd like. The lighthouse-config.js file location will be referenced in the --config-path parameter of the bashrc function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.