From 3abfe29ebaad7eb858550e7bbc11603f440bf3a6 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Thu, 15 Feb 2018 11:42:38 -0800 Subject: [PATCH 1/2] docs(headless-chrome): switch to prioritize headless --- docs/headless-chrome.md | 54 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/docs/headless-chrome.md b/docs/headless-chrome.md index fcff8ef0082d..e358a279beb1 100644 --- a/docs/headless-chrome.md +++ b/docs/headless-chrome.md @@ -1,10 +1,33 @@ # Running Lighthouse using headless Chrome -For now, we recommend running Chrome with xvfb. See below. +## CLI (headless) + +> **Note**: Headless Chrome still has a few bugs to work out. For example, [network emulation](https://bugs.chromium.org/p/chromium/issues/detail?id=728451) is not supported yet. +This can affect the accuracy of performance scores returned by Lighthouse. + +Setup: + +```sh +# get node 6 +curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - &&\ +sudo apt-get install -y nodejs + +# get chromium (stable) +apt-get install chromium-browser + +# install lighthouse +npm i -g lighthouse +``` + +Kick off run of Lighthouse using headless Chrome: + +```sh +lighthouse --chrome-flags="--headless" https://github.com +``` ## CLI (xvfb) -Chrome + xvfb is the stable solution we recommend. These steps worked on Debian Jessie: +Alternativeluy, you can run full Chrome + xvfb instead of headless mode. These steps worked on Debian Jessie: ```sh # get node 6 @@ -35,32 +58,7 @@ xvfb-run --server-args='-screen 0, 1024x768x16' \ lighthouse --port=9222 https://github.com ``` -## CLI (headless) - -> **Note**: Headless Chrome still has a few bugs to work out. For example, [network emulation](https://bugs.chromium.org/p/chromium/issues/detail?id=728451) is not supported yet. -This can affect the accuracy of performance scores returned by Lighthouse. - -Setup: - -```sh -# get node 6 -curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs - -# get chromium (stable) -apt-get install chromium-browser - -# install lighthouse -npm i -g lighthouse -``` - -Kick off run of Lighthouse using headless Chrome: - -```sh -lighthouse --chrome-flags="--headless" https://github.com -``` - -## Node +## Node module Install: From cb905b0654b6327a6b7d381329ceed5cdc9701df Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Wed, 21 Feb 2018 13:14:26 -0800 Subject: [PATCH 2/2] feedback --- docs/headless-chrome.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/headless-chrome.md b/docs/headless-chrome.md index e358a279beb1..367887e49c9e 100644 --- a/docs/headless-chrome.md +++ b/docs/headless-chrome.md @@ -2,9 +2,6 @@ ## CLI (headless) -> **Note**: Headless Chrome still has a few bugs to work out. For example, [network emulation](https://bugs.chromium.org/p/chromium/issues/detail?id=728451) is not supported yet. -This can affect the accuracy of performance scores returned by Lighthouse. - Setup: ```sh @@ -27,7 +24,7 @@ lighthouse --chrome-flags="--headless" https://github.com ## CLI (xvfb) -Alternativeluy, you can run full Chrome + xvfb instead of headless mode. These steps worked on Debian Jessie: +Alternatively, you can run full Chrome + xvfb instead of headless mode. These steps worked on Debian Jessie: ```sh # get node 6