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

include form factor to cli arguments #140

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

Danjar27
Copy link

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jul 10, 2023

🦋 Changeset detected

Latest commit: 880be52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
lighthouse-parade Minor

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

@spaceninja spaceninja requested a review from calebeby July 20, 2023 20:31
Copy link
Member

@calebeby calebeby left a 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'];
Copy link
Member

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'];
Copy link
Member

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'];
Copy link
Member

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:

  1. Before line 80 in cli.ts (this sets the help text when --help is used)
  2. In README.md

Thanks!

Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
included form factor as cli argument
Introduce `--lh:form-factor` CLI argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants