npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lets-lighthouse2.0

v2.0.0

Published

This tool helps you to generate lighthouse reports for provided sitemap URL & compare them effortlessly.

Downloads

13

Readme

Lets Lighthouse 2.0

Verify your page performance and improve it before it's too late.

Ease of analysis, reporting & comparison is powered by the "Let's Lighthouse" tool and backed by "Lighthouse" i.e. a proven tool to validate your page performance.

This tool helps you to generate lighthouse reports for provided sitemap URL & compare them effortlessly.

Note! 👋

⚡️⚡️⚡️⚡️⚡️⚡️⚡️⚡️⚡️⚡️

The large size of the unpacked file for this project is a result of the presence of sample lighthouse JSON files located within the dist folder.

⚡️⚡️⚡️⚡️⚡️⚡️⚡️⚡️⚡️⚡️

Required Node & NPM version

node >= 20.5.1

npm  >=9.8.0

Installation

Use the package manager npm to install Lets Lighthouse.

npm i lets-lighthouse2.0

Simple setup

Below command will generate the project-required folders and furnish them with dummy data.

  npm run init

Usage

To use this tool, you will need to crawl a website page by giving the actual sitemap URL path to the following command. The command below retrieves the URLs and creates a file named lighthouse.csv in the crawler directory.

Command 1

Command 1.1 (Fetch all the URLs listed under sitemap.xml)

npm run crawler https://www.google.com/docs/sitemaps.xml

Command 1.2 (Fetch only a few URLs listed under sitemap.xml)

npm run crawler https://www.google.com/docs/sitemaps.xml 10

Command 2

# Execute the below command to start lighthouse analysis on
# multiple URLs(uses */crawler/lighthouse.csv*)

npm run analysis

The above command will create the tests folder under your project root with all the analysis info as follows, you will also get a consolidated report in CSV format under the tests folder refer to the screenshot:

Command 3

# Compare 2 JSON files generated from the lighthouse.
# Refer to the JSON path from the above screenshot.

  npm run compare /2023-4-27/Dummy/Google/105453.json /2023-4-27/Dummy/Google/105658.json

Command 4 - Compare 2 lighthouse reports for multiple URLs.

To use this command, you have to follow some steps:

  1. Create an input folder to the root of the project, for example:
  1. Now, create compareit.csv file under input folder like as follows:
  1. It is time to edit the compareit.csv file as follows:

Note: Kindly follow the same header names, you can add Test IDs to compare, generated using command 1.

Execute the below command, this command will use Lighthouse Report Viewer


  npm run compare-csv

Execute the below command if you want to use Lighthouse Report Diff Tool


  npm run compare-csv v2

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT