-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
misc(build): generate report variants in deployment #9280
Conversation
@@ -237,6 +237,7 @@ class Runner { | |||
gatherMode: undefined, | |||
auditMode: undefined, | |||
output: undefined, | |||
channel: undefined, |
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.
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']) { |
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.
in the future, PSI will be another report variant.
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.
@@ -152,6 +152,7 @@ | |||
"jsonlint-mod": "^1.7.4", | |||
"lighthouse-logger": "^1.2.0", | |||
"lodash.isequal": "^4.5.0", | |||
"lodash.set": "^4.3.2", |
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.
bundlephobia says this is 2KB minified+gzipped, so basically a nonfactor for folks already invoking npm install lighthouse
😆
@@ -47,6 +47,7 @@ | |||
"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", |
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.
neat!
const filenameToLhr = { | ||
'english': lhr, | ||
'espanol': swapLocale(lhr, 'es').lhr, | ||
'arabic': swapLocale(lhr, 'ar').lhr, |
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 we do en-xa-local
once #9192 lands? 😃
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.
yup. definitely will.
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/
I have another PR waiting that adds an LHR/report with lots of errors.