Skip to content
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

docs(configuration): Add desktop docs #433

Merged
merged 2 commits into from
Aug 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ The maximum amount of time in milliseconds to wait for `startServerCommand` to p

#### `settings`

The [Lighthouse settings object](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md#settings-objectundefined) to pass along to Lighthouse. This can be used to change configuration of it Lighthouse itself.
The [Lighthouse settings object](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md#settings-objectundefined) to pass along to Lighthouse. This can be used to change configuration of Lighthouse itself.

**Example:**

Expand All @@ -374,6 +374,27 @@ The [Lighthouse settings object](https://github.com/GoogleChrome/lighthouse/blob
}
```

You can use the `settings` property to configure Lighthouse for testing your site on an emulated desktop device:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT of putting this down below in the Common Examples section where we have a longer list of examples?

I worry that including too many inline might detract from the primary goal of explaining what each LHCI property does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I didn't see that section previously. I've moved it now!


```jsonc
{
"ci": {
"collect": {
"settings": {
// Set the screen size
"emulatedFormFactor": "desktop",
// Define CPU and network characteristics
"throttling": {
"rttMs": 40,
"throughputKbps": 10240,
"cpuSlowdownMultiplier": 1
}
}
}
}
}
```

#### `numberOfRuns`

The number of times to collect Lighthouse results on each `url`. This option helps mitigate fluctations due to natural page [variability](https://github.com/GoogleChrome/lighthouse/blob/v6.0.0-beta.0/docs/variability.md).
Expand Down