-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
README: update CLI help with latest. Give common examples #2182
Conversation
lighthouse-cli/bin.ts
Outdated
@@ -52,6 +52,12 @@ const cliFlags = yargs | |||
.showHelpOnFail(false, 'Specify --help for available options') | |||
|
|||
.usage('$0 url') | |||
.example('$0 url --view', 'Opens the HTML report in a browser after the run completes') |
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.
IMO we should just use "lighthouse" rather than whatever $0 resolves to.
how about with brackets on the url too: lighthouse <url> --view
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.
done
@@ -209,7 +216,7 @@ function getDebuggableChrome(flags: {skipAutolaunch: boolean, port: number, sele | |||
chromeFlags: string}): Promise<ChromeLauncher> { | |||
const chromeLauncher = new ChromeLauncher({ | |||
port: flags.port, | |||
additionalFlags: flags.chromeFlags.split(' '), | |||
chromeFlags: flags.chromeFlags.split(' '), |
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.
this is a breaking change and some other folks rely on the API, but @samccone's work here will break them too and hopefully have some docs so its easy to do the right thing.
all that said, +1 to this change.
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.
Yea, I figure we're covered under the 2.0 veil
readme.md
Outdated
--interactive Open Lighthouse in interactive mode [boolean] | ||
|
||
Examples: | ||
lighthouse-cli/index.js url --view Opens the HTML report in a browser |
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'd repeat this paste with the new terminalWidth change, for less wrapping.
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.
done
PTAL |
--help
--help
additionalFlags
->chromeFlags
so we're consistent. It's confusing that we use--chrome-flags
in some places (LH CLI) andadditionalFlags
in other places (chrome-debug
,ChromeLauncher
).--chrome-flags
better signals that these flags are Chrome specific and not Lighthouse flags.