Skip to content

runs lighthouse locally against sites defined in reports.json

Notifications You must be signed in to change notification settings

WebKenth/lighthouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Run

Install dependencies and copy the sample file

yarn;

cp reports-sample.json reports.json

Two scripts are included and can be run with

yarn run production
#or
yarn run staging

to run lighthouse:

node index.js <subfolder>

It will report each score and save a .html file at reports/<project>/<subfolder>/<report.name>.html

If the subfolder is omitted it will be saved at reports/<project>/<report.name>.html

Running the test twice with same name will overwrite the previous run

How does it work?

reports.json contains the projects and sites it ruuns

structure:

[
    {
        "name": "<project-name>",
        "reports":
        [
            {
                "name": "<report-name>",
                "url": "<fully-qualified-url>"
            }
        ]
    }
]

You can add multiple projects and reports to suit your needs

About

runs lighthouse locally against sites defined in reports.json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published