Skip to content

Instantly share code, notes, and snippets.

@hereswhatidid hereswhatidid/bashrc.sh
Last active Feb 18, 2019

Embed
What would you like to do?
Run lighthouse from a bashrc function. ex: "lh https://mynewsite.com"
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'
},
};
@hereswhatidid

This comment has been minimized.

Copy link
Owner Author

hereswhatidid commented Feb 18, 2019

Add the bashrc.sh 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.