-
Notifications
You must be signed in to change notification settings - Fork 15
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
include form factor to cli arguments #140
base: next
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 880be52 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Hi @Danjar27! Thanks so much for this PR, it is super helpful and great job!
I left a few suggestions. Let me know if you have any questions.
@@ -125,6 +125,8 @@ sade('lighthouse-parade <url>', true) | |||
|
|||
const includePathGlob: string[] = toArray(opts['include-path-glob']); | |||
|
|||
const formFactor = opts['form-factor']; |
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.
Can you change the flag name to have the lh:
prefix, similar to how we named --lh:only-categories
? We are using that prefix for any flag that gets passed directly into lighthouse.
@@ -125,6 +125,8 @@ sade('lighthouse-parade <url>', true) | |||
|
|||
const includePathGlob: string[] = toArray(opts['include-path-glob']); | |||
|
|||
const formFactor = opts['form-factor']; |
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.
Could you also please add a check here similar to the other flags that checks that the input is a string and that it is either 'desktop' or 'mobile', and fail with a helpful error otherwise?
@@ -125,6 +125,8 @@ sade('lighthouse-parade <url>', true) | |||
|
|||
const includePathGlob: string[] = toArray(opts['include-path-glob']); | |||
|
|||
const formFactor = opts['form-factor']; |
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.
Could you also add documentation for this feature so that if someone does lighthouse-parade --help
it lists the new flag and describes what it does? It would need to be added in these places:
- Before line 80 in
cli.ts
(this sets the help text when--help
is used) - In
README.md
Thanks!
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.
You can use the description here from lighthouse-cli as a starting point: https://github.com/GoogleChrome/lighthouse#cli-options
'lighthouse-parade': minor | ||
--- | ||
|
||
included form factor as cli argument |
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.
included form factor as cli argument | |
Introduce `--lh:form-factor` CLI argument |
No description provided.