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
feat(cli): add --puppeteer-script flag to collect #118
Conversation
}; | ||
``` | ||
|
||
Lighthouse CI will then use this browser that the script sets up when running Lighthouse. Note that if you store your credentials in `localStorage` or anything other than a cookie you might want to pair this option with `--settings.disableStorageReset` to force Lighthouse to keep the cache state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to our auth docs too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it's linked in troubleshooting.
@@ -1,8 +1,7 @@ | |||
#!/bin/bash | |||
|
|||
CURRENT_VERSION=$(node -e "console.log(require('./package.json').dependencies['@lhci/server'])") | |||
# NEXT_VERSION=$(yarn info @lhci/server | grep 'latest:' -A 1 | tail -n 1 | grep -o "'.*'" | sed s/\'//g) | |||
NEXT_VERSION=0.3.3 | |||
NEXT_VERSION=$(yarn info @lhci/server | grep 'latest:' -A 1 | tail -n 1 | grep -o "'.*'" | sed s/\'//g) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woah. maybe do a call to node like the line above? this is inscrutable :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing it all in node would be at least a dozen lines though :)
docs/cli.md
Outdated
```js | ||
/** | ||
* @param {puppeteer.Browser} browser | ||
* @param {{url: string, options: LHCI.CollectOptions}} context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this type is defined anywhere. is it {url:string, options: LHCI.Options}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's not it was meant to just be user friendly "here are the collect options" but i'll use the real one :)
8f056b3
to
9684772
Compare
closes #89
Usage looks like:
Example
login-with-puppeteer.js