-
Notifications
You must be signed in to change notification settings - Fork 12
Adding new form factor and improving PR comments #32
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
Changes from all commits
b07f8b4
c926218
8487b10
bcb771b
514da4a
c2edd96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,6 +108,7 @@ export const localLighthouse = async ({ | |
| url, | ||
| localReport, | ||
| report, | ||
| emulatedFormFactor, | ||
| scores | ||
| }; | ||
| }; | ||
|
|
@@ -143,11 +144,7 @@ export default async ({ | |
| let index = 1; | ||
|
|
||
| for (const url of urls) { | ||
| if (verbose) { | ||
Mirzamohammad22 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| console.log(`${NAME}: Auditing (${index}/${urls.length}) ${url}`); | ||
| } | ||
|
|
||
| const lighthouseAuditResult = await localLighthouse({ | ||
| const options = { | ||
| awsAccessKeyId, | ||
| awsBucket, | ||
| awsRegion, | ||
|
|
@@ -160,11 +157,38 @@ export default async ({ | |
| overrides, | ||
| throttling, | ||
| throttlingMethod, | ||
| url | ||
| }); | ||
| url, | ||
| verbose | ||
| }; | ||
|
|
||
| auditResults.push(lighthouseAuditResult); | ||
| index++; | ||
| if (options.emulatedFormFactor !== 'both') { | ||
| if (verbose) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
EDITED: My mistake, I see why we need it, because
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No issues , let me know if the |
||
| console.log( | ||
| `${NAME}: Auditing (${index}/${urls.length}) ${options.url} in Mode:${options.emulatedFormFactor}` | ||
| ); | ||
| } | ||
| const lighthouseAuditResult = await localLighthouse(options); | ||
| auditResults.push(lighthouseAuditResult); | ||
| index++; | ||
| } else { | ||
| options.emulatedFormFactor = 'desktop'; | ||
| if (verbose) { | ||
| console.log( | ||
| `${NAME}: Auditing (${index}/${urls.length}) ${options.url} in Mode:${options.emulatedFormFactor}` | ||
| ); | ||
| } | ||
| const lighthouseAuditResultDesktop = await localLighthouse(options); | ||
| options.emulatedFormFactor = 'mobile'; | ||
| if (verbose) { | ||
| console.log( | ||
| `${NAME}: Auditing (${index}/${urls.length}) ${options.url} in Mode:${options.emulatedFormFactor}` | ||
| ); | ||
| } | ||
| const lighthouseAuditResultMobile = await localLighthouse(options); | ||
| auditResults.push(lighthouseAuditResultDesktop); | ||
| auditResults.push(lighthouseAuditResultMobile); | ||
| index++; | ||
| } | ||
| } | ||
|
|
||
| // if outputDirectory is specified write the results to disk | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.