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

arjan-audit

v0.5.2

Published

audit the SEO of your website during development using lighthouse 6

Downloads

34

Readme

License

Arjan Audit

Arjan audit is a simple node module that helps automate the auditing process of static sites during the dev process using Google’s lighthouse 6. Often times when building a site, the page speed test is one of the last things we do. To avoid any surprise surprise, you can use arjan audit in your dev process or even integrate it into your tests.

How it works

Arjan audit uses express to serve your site and google chrome-launcher to make a headless launch of google chrome and retrieve the audits from lighthouse 6. Arjan then parses the results returned by lighthouse and return an organized subset of the results. When used from the CLI, arjan returns a neatly formatted report.

Getting Started

  1. install the arjan CLI globally. npm i -g arjan-cli
  2. inside your proejct direcotry, initialize arja arjan init
  3. run an audit arjan audit

CLI Command

USAGE
  $ arjan audit

OPTIONS
  -d, --dir=dir              Directory path to serve. default is root (relative to the path in which you run the command)

  -f, --file=file            Path of the page you want to audit. default is index.html

  -p, --port=port            Port used for the test server. Default is 8080.

  -t, --threshold=threshold  Integer value from 0 to 1 that represents what you consider to be an acceptable lighthouse score for your site. Its very similar to what you would consider an acceptable school test grade.

Programmatic use example

const Audit = require('arjan-audit')
Audit('./', 'index.html', 8080, .7)
.then(data=> console.log(data))
.catch(err=>console.log(err))

API

main

description: params: (dir, index, port, threshhold)

 **dir**: string
 **index**: string
 **port**: int
**treshhold**: float: number between 0 and 1

returns: Promise(resolve, reject)

**resolve**: string: formatted
**reject**: error

The Audit Report

the audit report is a subset of data from the JSON response of lighthouse 6. for more information on the parameters of lighthouse 6 see this link

{
  "lh5_score":float,
  "lh6_score":float,
  "main_metrics":{
    "metric":{
      "title":"string",
      "score":float,
      "description":"string"
    }
  },
  "improvements":{
    "improvement":{
      "title":"title",
      "score":float,
      "description":"description",
      "details":{}
    }
  }
}

Lighthouse 6 score

Google recently recalculated the score of what they consdier a healthy fast site. The new LCP metric was introduced and the score weights and metrics were changed. for more information check out Google’s Web Vitals

| Audit | Weight | | ---------------------------------------------------------------------- | ------ | | First Contentful Paint | 15% | | Speed Index | 15% | | Largest Contentful Paint | 25% | | Time to Interactive | 15% | | Total Blocking Time | 25% | | Cumulative Layout Shift | 5% |

For more info read the docs