From faefece005d8349e457bfd6fc96df243bd559738 Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Thu, 27 Aug 2020 17:50:43 +0200 Subject: [PATCH 1/2] Add desktop docs --- docs/configuration.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 1c44d9f97..f346631d9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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:** @@ -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: + +```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). From 31f314490b49bc72a4a6b3f2343de5100b0277ee Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Fri, 28 Aug 2020 09:12:19 +0200 Subject: [PATCH 2/2] Move to examples --- docs/configuration.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index f346631d9..f529eaf16 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -374,27 +374,6 @@ 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: - -```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). @@ -1111,6 +1090,27 @@ If you're a Lighthouse pro, assert the recommended preset, increase the number o } ``` +### Desktop emulation + +```jsonc +{ + "ci": { + "collect": { + "settings": { + // Set the screen size + "emulatedFormFactor": "desktop", + // Define CPU and network characteristics + "throttling": { + "rttMs": 40, + "throughputKbps": 10240, + "cpuSlowdownMultiplier": 1 + } + } + } + } +} +``` + ### Custom Chrome Flags ```jsonc