
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@humanmade/bulk-lighthouse
Advanced tools
Run bulk lighthouse tests using Google PageSpeed Insights API
Run bulk lighthouse tests using Google PageSpeed Insights API.
Define several URLs for significant pages on your site, and run tests against them all easily. The results are displayed in your console, and also saved in a file as JSON so that you can save for future reference.
bulk-lighthouse .config/lighthouse.json
urls
.{
"categories": {
"performance": {
"threshold": {
"desktop": 90,
"mobile": 70
}
},
},
"strategies": [
"mobile",
"desktop"
],
"urls": {
"production": [
'http://example.com
],
}
}
googleApiKey
: Optional. See https://developers.google.com/speed/docs/insights/v5/get-started to generate an API key. Providing one will ensure that you don't hit rate limits.
searchParams
Object. Optional. Add search params to the URL you're running the tests against. This can be used to pass keys for authentication.
categories
Required. Object. Tests to run. Provide a pass/fail threshold for each test. Specify a different threshold for each environment. The following config will run only the performance test. See https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed#Category.
"categories": {
"performance": {
"threshold": {
"desktop": 90,
"mobile": 70
}
},
"accessibility": {
"threshold": {
"desktop": 90,
"mobile": 90
}
},
"seo": {
"threshold": {
"desktop": 90,
"mobile": 90
}
},
},
strategies
Required. Array. The device running strategy to be used in analysis. Both, or one of desktop
or `mobile. See https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed#strategy
urls
. Required. Group URLs (e.g. by environment). Specify the group of URLs to run when executing the script e.g. node .scripts/lighthouse.js staging
. If no group is specified, the first one configured will be used.
"urls": {
"production": [
"https://example.com/",
"https://example.com/about",
],
"staging": [
"https://staging.example.com/",
"https://staging.example.com/about",
]
}
resultsDir
Optional. Directory in which to save results as JSON. Defaults to lighthouse-reports
.
FAQs
Run bulk lighthouse tests using Google PageSpeed Insights API
We found that @humanmade/bulk-lighthouse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.