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

full-site-screenshot

v0.1.0

Published

This small utility package provides a cli for automating the capture of screenshots for multiple pages across a website using puppeteer full page screenshots.

Downloads

4

Readme

Full Site Screenshot

This small utility package provides a cli for automating the capture of screenshots for multiple pages across a website using puppeteer full page screenshots.

It will output all captures individually and optionally create a PDF with all of them as well.

Installation

You can install the package globally with

npm install -g full-site-screenshot

Or you can simple run directly using npx instead

npx full-site-screenshot

Usage

The capture cli has three modes for selecting the target web pages:

  • Sitemap - This allows you to point to a sitemap and it will extract the pages automatically and capture all of them
  • CSV File - Point to a local csv file with all the page URLs you want to capture
  • Single - paste in the web address you want to capture

Once you select your targets you can pick a loading strategy to make sure lazy loaded images and other content is captured:

  • Pre Scroll - emulates scrolling down the full page and is usually the best strategy
  • Full Height - sometimes animated elements will still not show up with emulated scrolling. In this case we can set the viewport height to the full page height and trick the element into believing it is in view. This can create issues with any dom elements using "vh" sizing units.

The cli will then walk you through some options like the desired viewport width for the capture and whether you want to create a PDF in addition to individual images.

You will also be prompted to choose an "interaction delay" this is to allow assets to load and for any intro animations to complete. The default is 5 seconds. You can reduce to speed up captures, but if elements are missing try increasing this value to make sure everything is loaded properly.

All outputted images and the pdf will be placed into a screencapture-output directory created within the working directory when the package is called.

Custom Instances

For some sites you may need additional logic like closing cookie banners, clicking on modals or accordions, etc.

This package is intentionally slim and does not handle these cases. Instead, you can download the soruce files for this package from github where there is a branch called "custom-actions". This gives you an entry point to add additional logic when the page loads. You can fork this or simply download and use as you see fit.