Skip to content

Conversation

@paulirish
Copy link
Member

Currently our builder just gives us a single sample LHR report. But we'd like to see it in other languages and in a more devtools-like view.

e.g. https://lighthouse-git-deployvariants.googlechrome.now.sh/

image

I have another PR waiting that adds an LHR/report with lots of errors.

gatherMode: undefined,
auditMode: undefined,
output: undefined,
channel: undefined,
Copy link
Member Author

Choose a reason for hiding this comment

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

mostly unrelated. just a driveby.

// Generate and write reports
Object.entries(filenameToLhr).forEach(([filename, lhr]) => {
let html = ReportGenerator.generateReportHtml(lhr);
for (const variant of ['', '-devtools']) {
Copy link
Member Author

Choose a reason for hiding this comment

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

in the future, PSI will be another report variant.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

this is awesome 😍

hello i18n reviews made easy :D
image

PS - lint is upset :)

"jsonlint-mod": "^1.7.4",
"lighthouse-logger": "^1.2.0",
"lodash.isequal": "^4.5.0",
"lodash.set": "^4.3.2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

bundlephobia says this is 2KB minified+gzipped, so basically a nonfactor for folks already invoking npm install lighthouse 😆

"chrome": "node lighthouse-core/scripts/manual-chrome-launcher.js",
"fast": "yarn start --emulated-form-factor=none --throttlingMethod=provided",
"deploy-viewer": "yarn build-viewer --deploy",
"now-build": "node lighthouse-core/scripts/build-report-for-autodeployment.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

neat!

const filenameToLhr = {
'english': lhr,
'espanol': swapLocale(lhr, 'es').lhr,
'arabic': swapLocale(lhr, 'ar').lhr,
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we do en-xa-local once #9192 lands? 😃

Copy link
Member Author

Choose a reason for hiding this comment

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

yup. definitely will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants