-
Clone Lighthouse CI repository
-
Go to the repository root directory:
cd lighthouse-ci -
Edit
scripts/build-app.jsand disable JS minification by setting theminifytofalse -
Execute
yarn install --frozen-lockfilecommand -
Execute
yarn buildcommand -
Go to
packages/viewer/distfolder and copy all its content -
Go to
vividus-lighthouse-viewer-adaptationrepository 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>.jsbundle and replacebaseReportinitialization inAppcomponent with the following code:const [baseReport, setBaseReport] = h2({ lhr: __LIGHTHOUSE_JSON_BASE__ }); -
Open
chunks/entry-<rand>.jsbundle and replacecompareReportinitialization inAppcomponent with the following code:const [compareReport, setCompareReport] = h2({ lhr: __LIGHTHOUSE_JSON_COMPARE__ }); -
Open
index.htmlfile 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.htmlfile./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>.jsfile./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>.cssfile../assets/should be replaced../../vividus-lighthouse-viewer-adaptation/assets/chunks/should be replaced with../../webjars/vividus-lighthouse-viewer-adaptation/chunks/
-
Commit the changes using
Customizationmessage format -
Minify
chunks/entry-<rand>.jsusing JS minification tool and replacechunks/entry-<rand>.jsfile content with the minified content -
Commit the changes using
Minifiedmessage format -
Push the branch
vividus-framework/vividus-lighthouse-viewer-adaptation
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|