question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inject lighthouse initialisation parameters

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zivkazivcommented, Nov 7, 2019

NP… Thank you:)

1reaction
lirantalcommented, Nov 7, 2019

Zvika I’ll close this for now unless you’d want to pursue it later with some action where we can re-open it

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found