-
Clone Lighthouse CI repository
-
Go to the repository root directory:
cd lighthouse-ci
-
Edit
scripts/build-app.js
and disable JS minification by setting theminify
tofalse
-
Execute
yarn install --frozen-lockfile
command -
Execute
yarn build
command -
Go to
packages/viewer/dist
folder and copy all its content -
Go to
vividus-lighthouse-viewer-adaptation
repository and create a new branch usingviewer-<lighthouse-ci commit hash used to build dist>
pattern -
Paste previously copied content to the current folder and commit changes using
Build: <lighthouse-ci commit hash used to build dist>
message format -
Open
chunks/entry-<rand>.js
bundle and replacebaseReport
initialization inApp
component with the following code:const [baseReport, setBaseReport] = h2({ lhr: __LIGHTHOUSE_JSON_BASE__ });
-
Open
chunks/entry-<rand>.js
bundle and replacecompareReport
initialization inApp
component with the following code:const [compareReport, setCompareReport] = h2({ lhr: __LIGHTHOUSE_JSON_COMPARE__ });
-
Open
index.html
file and add the following script after<div id="preact-root"></div>
element:<script type="application/javascript"> window.__LIGHTHOUSE_JSON_BASE__ = ${baseline}; window.__LIGHTHOUSE_JSON_COMPARE__ = ${checkpoint}; </script>
-
Perform the following replacements in
index.html
file./chunks/
should be replaced with../../webjars/vividus-lighthouse-viewer-adaptation/chunks/
assets/
should be replaced with../../webjars/vividus-lighthouse-viewer-adaptation/assets/
-
Perform the following replacements in
chunks/entry-<rand>.js
file./assets/
should be replaced with../../webjars/vividus-lighthouse-viewer-adaptation/assets/
chunks/
should be replaced with../../webjars/vividus-lighthouse-viewer-adaptation/chunks/
-
Perform the following replacements in
chunks/entry-<rand>.css
file../assets/
should be replaced../../vividus-lighthouse-viewer-adaptation/assets/
chunks/
should be replaced with../../webjars/vividus-lighthouse-viewer-adaptation/chunks/
-
Commit the changes using
Customization
message format -
Minify
chunks/entry-<rand>.js
using JS minification tool and replacechunks/entry-<rand>.js
file content with the minified content -
Commit the changes using
Minified
message format -
Push the branch
-
Notifications
You must be signed in to change notification settings - Fork 0
License
vividus-framework/vividus-lighthouse-viewer-adaptation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published