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

sitegazer

v0.0.3

Published

SiteGazer crawls all of your pages and find errors from the crawled pages

Downloads

6

Readme

SiteGazer

SiteGazer crawls all of your pages and find errors from the crawled pages.

Requirement

  • Node.js 10+
  • Java 8+ (if you want to run nu plugin)
  • puppeteer dependencies if you want to install SiteGazer on Linux (SiteGazer depends on puppeteer)

Note: SiteGazer does not work on Windows Subsystems for Linux due to puppeteer limitation. See also this issue.

Install

$ yarn global add sitegazer
$ npm install -g sitegazer

If you want to install with sudo on Linux systems, yarn is recommended way to install. Unfortunately, sudo npm install -g sitegazer may fail to install due to permission issue.

Usage

  1. Create sitegazer.config.js

Here's example of sitegazer.config.js. For full reference, see sitegazer.config.js reference section

"use strict";

module.exports = {
  urls: [
    "https://phanective.org",
    "https://google.com",
  ],
  sitemap: true,
  crawl: true,
  plugins: [ "nu", "chrome-console" ],
};
  1. Start SiteGazer
$ cd /path/to/directory # Move to the directory which sitegazer.config.js exists
$ sitegazer

sitegazer.config.js reference

"use strict";

module.exports = {
  urls: [
    "https://phanective.org",
    "https://phanective.org/cv/",
    "https://google.com",
  ],
  sitemap: false,
  crawl: false,
  plugins: [ "nu", "chrome-console" ],
  userAgents: {
    desktop: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36",
    mobile: "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Mobile Safari/537.36"
  },
  config: {
    webhint: {
      extends: [ "web-recommended" ],
    },
  },
};

urls

Type: string[] Default: []

URLs to lint. If crawl: false and sitemap: false, SiteGazer only lint the pages listed in urls.

sitemap

Type: boolean Default: true

If true, SiteGazer lint the URLs listed in sitemap.xml, in addition to URLs listed in urls.

crawl

Type: boolean Default: true

If true, SiteGazer detect <a> tags from the linted pages, and lint the detected URLs in addition to URLs listed in urls.

plugins

Type: string[] Default: []

Linter plugins. Currently SiteGazer Supports following plugins:

  • nu (Nu HTML Checker)
  • chrome-console (List errors detected on Console of Chrome Developer Tools)
  • webhint (WebHint)

userAgents

Type: object Default:

{
  desktop: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36",
  mobile: "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Mobile Safari/537.36",
}

Object of user agent strings. If two or more user agent strings are given, SiteGazer lint with each user agent strings.

config

Type: object Default: {}

Config for each plugins.

config.webhint

Type: object Default: {}

Config for WebHint. It is the same as .hintrc. See WebHint document to learn more.

Example:

{
  extends: [ "web-recommended" ],
}

License

Apache 2.0

© 2019 Jumpei Ogawa