Skip to content

guoyu07/google-lighthouse-puppeteer-cli-dashboard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Lighthouse Puppeteer Cli Dashboard

latest release NPM release Bitcoin donation Litecoin donation PayPal donation

Description

The purpose of this package is to have a quick and simple overview of your Lighthouse-Puppeteer report.

Installation

yarn add google-lighthouse-puppeteer-cli-dashboard -g
or
npm install google-lighthouse-puppeteer-cli-dashboard --global

Usage

$> lp-dashboard -h                                  

Options

  -f, --file file    Path to your summary.json (default : /home/chrome/reports/summary.json)       
  -r, --rules json   JSON of an object explaining the title of the rule and the JSONPath rule. Can 
                     be multiple (use -r for each rule)                                            
                                                                                                   
                     Example: -r "{\"Interactive value\": \"\$.audits['consistently-               
                     interactive'].displayValue\"}"                                                
  -h, --help         Print this usage guide.                                                       

Output

╔═══════════════════════════════════════════════════════════╤═══════════════════╗
║                                                           │ Interactive value ║
╟───────────────────────────────────────────────────────────┼───────────────────╢
║ https://myawesome.site/admin/lightpage/list?id=1          │ 6,740 ms          ║
╟───────────────────────────────────────────────────────────┼───────────────────╢
║ https://myawesome.site/admin/heavypage/list?id=12         │ 8,610 ms          ║
╚═══════════════════════════════════════════════════════════╧═══════════════════╝

Package Usage

const dashboard = require('google-lighthouse-puppeteer-cli-dashboard');

const db = new dashboard({file:'/path/to/summary.json'}); //file is optional - Default : /home/chrome/reports/summary.json
console.log(db.getTable()); // displays CLI dashboard
console.log(db.getReport()); // returns a Json with filtered results for each URL
console.log(db.reportToTable(db.getReport())); // returns an Array to be converted in CLI dashboard

About

Google Lighthouse Puppeteer CLI Dashboard - NPM Package

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.8%
  • Makefile 15.2%