Skip to content

Run Lighthouse (perf only) and Layout Shift tests on your favorite urls listed in Google Sheets and save them locally via CLI

Notifications You must be signed in to change notification settings

performance-addicts/lh-cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lh-cmd

Run Lighthouse (perf only) and Layout Shift tests on your favorite urls listed in Google Sheets and save them locally via CLI.


Installation



Install Lighthouse and layout-shift-gif globally

npm install -g lighthouse

npm install -g layout-shift-gif

npm install this project's dependencies


Setup



GOOGLE_EMAIL="" - Email associated with Sheets API

GOOGLE_PRIVATE_KEY="" - Private key associated with Sheets API

SHEET_ID="" - Sheet ID found in Sheet URL

SHEET_NAME="" - Name of worksheet containing list of URLs (Put 10 top urls in Column A starting at the first row)


Usage



npm start and select url from list or enter your own url.


Optional: If you enter your own url, enter a filename for your reports.


When finished, key Lighthouse metrics will be printed on the command line. The Lighthouse report will automatically open in your default browser.

2 files will be saved based on the filename you provided or present in the page list.

[filename]-MM-DD-YYYY-HH-mm-ss.report.json
[filename]-MM-DD-YYYY-HH-mm-ss.report.html

Choose whether to run layout-shift-gif



If yes, CLS gif generator will run and save 2 files.
temp-screenshot.png
[filename]-MM-DD-YYYY-HH-mm-ss.gif

About

Run Lighthouse (perf only) and Layout Shift tests on your favorite urls listed in Google Sheets and save them locally via CLI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published