-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lighthouse scripts #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well! Just needs a rebase to fix the conflicts, and the npm
commands aren't needed in the package.json scripts.
package.json
Outdated
"lighthouse": "npm exec -- lighthouse-ci http://localhost:8888/ --accessibility=100 --best-practices=100", | ||
"lighthouse:desktop": "npm exec -- lighthouse http://localhost:8888/ --view --preset=desktop --output-path=lighthouse.html", | ||
"lighthouse:mobile": "npm exec -- lighthouse http://localhost:8888/ --view --preset=mobile --output-path=lighthouse.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"lighthouse": "npm exec -- lighthouse-ci http://localhost:8888/ --accessibility=100 --best-practices=100", | |
"lighthouse:desktop": "npm exec -- lighthouse http://localhost:8888/ --view --preset=desktop --output-path=lighthouse.html", | |
"lighthouse:mobile": "npm exec -- lighthouse http://localhost:8888/ --view --preset=mobile --output-path=lighthouse.html" | |
"lighthouse": "lighthouse-ci http://localhost:8888/ --accessibility=100 --best-practices=100", | |
"lighthouse:desktop": "lighthouse http://localhost:8888/ --view --preset=desktop --output-path=lighthouse.html", | |
"lighthouse:mobile": "lighthouse http://localhost:8888/ --view --preset=mobile --output-path=lighthouse.html" |
If we wanted, we could also run the tests on PR or trunk merge and save the artifact within the action. |
Yeah I think lighthouse-ci will be useful for that. It's probably not needed at this stage but I might make a draft PR after merging this part. |
`yarn lighthouse:desktop` and `yarn lighthouse:mobile` to view detailed reports with the desktop and mobile preset respectively.
e62de34
to
bdb186d
Compare
Also remove redundant `npm exec`
This installs
lighthouse-ci
and adds an easy script for running Lighthouse.Props ,
Screenshots
How to test the changes in this Pull Request:
yarn
yarn lighthouse
yarn lighthouse:desktop
yarn lighthouse:mobile