[go: nahoru, domu]

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

misc(build): generate report variants in deployment #9280

Merged
merged 2 commits into from
Jun 25, 2019
Merged

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.

@@ -237,6 +237,7 @@ class Runner {
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 :)

@@ -152,6 +152,7 @@
"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 😆

@@ -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",
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.

None yet

3 participants