Inject lighthouse initialisation parameters
See original GitHub issueIs your feature request related to a problem? Please describe. Every new lighthouse flag/ scan configuration/ whatever will require changes in the Audit class. Instead I think we should build the lighthouse parameters outside the Audit class, and inject it. I think it will give more flexibility for more complex configurations, and less risk for regression bugs in the future.
Describe the solution you’d like
module.exports = class Audit {
constructor(lighthouseConfig) {
this.lighthouseConfig = lighthouseConfig || lighthouse.defaultConfig
}
}
...
this.lighthouseConfig.opts.port = this.lighthouseConfig.opts.port || chromeInstance.port
debug(`invoking lighthouse scan for: ${url}`)
const scanResult = await lighthouse(url, this.lighthouseConfig.opts, this.lighthouseConfig.config);
....
Describe alternatives you’ve considered Keep it the way it is:)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
lighthouse/github-com-tektoncd-pipeline-pkg-apis-pipeline ...
Params is a list of parameter names and values. serviceAccountName, string, No, +optional. serviceAccountNames, []PipelineRunSpecServiceAccountName, No ...
Read more >Directives - Lighthouse PHP
Returns an aggregate of a column in a given relationship or model. Requires Laravel 8+. """ directive @aggregate( """ The column to aggregate....
Read more >Using Lighthouse Bot to set a performance budget - web.dev
In your project's Travis dashboard, go to More options > Settings > Environment variables. Paste the token in the value field, name the...
Read more >Getting Started with LightHouse CI - Part 2
Lighthouse CI is a node CLI that make continuously running, asserting, saving, and retrieving Lighthouse results as easy as possible.
Read more >Lighthouse Widget API - HelpDocs Support
When you initialize Lighthouse you'll have used a snippet of Javascript code from your HelpDocs dashboard in Settings > Lighthouse.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NP… Thank you:)
Zvika I’ll close this for now unless you’d want to pursue it later with some action where we can re-open it