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

warm-social-images

v1.0.3

Published

Simple CLI to warm the cache of social images in all pages from a sitemap.

Downloads

10

Readme

warm-social-images

Simple CLI to warm the cache of social images in all pages from a sitemap.

NPM Build Status Prettier Code Formatting

Why

Using serverless functions to generate images for social media is pretty common.

If you're caching them with a CDN like Vercel or Cloudflare, then they will resolve quickly after the first GET.

But after fresh deploys, all of these social images will resolve very slowly, which may impact how your site is viewed on social media.

Usage

Usage:
  $ warm-social-images <sitemap-url>

Commands:
  <sitemap-url>  Fetches social images from all of the pages in a given sitemap

For more info, run any command with the `--help` flag:
  $ warm-social-images --help

Options:
  --concurrency <concurrency>  Sets the concurrency for processing pages (default: 8)
  --silent                     Silences logging (default: false)
  -h, --help                   Display this message
  -v, --version                Display version number

Example

npx warm-social-images https://transitivebullsh.it/sitemap.xml

which outputs:

processing 98 pages
2: 21.5 kB https://transitivebullsh.it/api/social-image?id=9a7ddf29-7344-4067-bbc5-ce0a4e0e0058
3: 66 kB https://transitivebullsh.it/api/social-image?id=076e0ecd-03dd-42db-a525-d67f18501500
0: 24.3 kB https://transitivebullsh.it/api/social-image?id=78fc5a4b88d74b0e824e29407e9f1ec1
1: 24.3 kB https://transitivebullsh.it/api/social-image?id=78fc5a4b-88d7-4b0e-824e-29407e9f1ec1
...
97: 24.1 kB https://transitivebullsh.it/api/social-image?id=3aab2f4a-9ead-4952-8efa-71fdc5141d54
93: 22.5 kB https://transitivebullsh.it/api/social-image?id=0c0dc729-b961-4998-8611-c42fa6744276
{ numSuccess: 98, numError: 0, numNotFound: 0 }

License

MIT © Travis Fischer

Support my OSS work by following me on twitter