Last week in my blog i mentioned working on integrating Lighthouse CI into our course project. The goal was to provide a tool for contributors working on the front-end side of the project. With lighthouse, our contributors could run some diagnostics test to know which parts of the front-end could be improved upon.
So for the last week, I have been reading documentation and blogs/articles for lighthouse ci. One of the things i picked up was that for a future project i could use lighthouse ci and integrate it with my server, and also i can use Github Actions to automatically run diagnostics and produce reports.
But this wasn't the solution we needed for our course project. So i came across the CLI documents. With the Lighthouse CLI, I would be able to set up it up and test the files locally.
Using npm i installed the API:
Afterward, i used collect the run the diagnostics tests and store lighthouse reports in the .lighthouseci/ folder. Using the command-line flag --staticDistDir allowed for us to specify where the HTML files to run the test are located.npm install -g @lhci/cli
lhci collect --staticDistDir=./src/frontendAfter running the command, the reports are generated as JSON files in the local file. This wasn't what we wanted as we were looking for HTML generated files. Uploading the reports using the upload command wasn't an option for us either. Uploading would generate URLs for us to view the reports.
So after consulting my course instructor, we came to the conclusion that i would instead do some research with Lighthouse and scrap the work on Lighthouse CI.
So for the following week, i will be trying to figure out how we could use Lighthouse.
Comments
Post a Comment