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

@cake-hub/cake-screenshot_diffs

v1.0.0

Published

A CAKE Screenshot diffing tool that includes a setup to comapre two given resources by screenshots taken from the available pages.

Downloads

44

Readme

Cake - Screenshot diffs

Who we are

CAKE is a design system and frontend framework for the whole "Schwarz Gruppe". We offer some tools, guidelines and systems to develop faster products that match the CI.

Check out our project website https://cake.schwarz.

What I am

A CAKE Screenshot diffing tool that includes a setup to comapre two given resources by screenshots taken from the available pages.

Getting started

Install our package by running:

npm install --save @cake-hub/cake-screenshot_diffs

Afterwards the command cake-screenshot_diffs will be made avaiable in the context of your installation path. So to compare two resources you only have to run the command:

npx cake-screenshot_diffs

This command assumes, that you have set up a valid configration file called ./cake-screenshot.yml in the root of your project folder. But you could also provide another location for your configuration file like in the following example:

npx cake-screenshot_diffs --config ./test/other-location.yml

Commands

  • npx cake-screenshot_diffs [--config|--configurationPath|--version|--help]

Run npx cake-screenshot_diffs --help to get a list of all command line options.

Configuration file

The configuration file is required and it's default location will be ./cake-screenshot.yml. It's structure looks like the following example:

referenceUrl: https://your.production.website/
url: https://your.test.environment/
reportPath: ./backstop_report
viewports:
- label: XS
  width: 320
  height: 568
- label: SM
  width: 600
  height: 960
- label: MD
  width: 960
  height: 600
- label: LG
  width: 1280
  height: 1024
scenarios:
  delay: 3000
  misMatchThreshold: 0.02
  selectors:
  - document
crawlers:
  maxDepthToFollow: 0
  maxConcurrentConnections: 10
  fileExtensions:
    - .html
  assetFileExtensions:
    - .png
    - .jpg
    - .jpeg
    - .gif
    - .mp4
    - .svg
backstop:
  asyncCaptureLimit: 10
  asyncCompareLimit: 20
  …

Most of the settings are optional but there are also mandatory properties as described in the list below:

  • referenceUrl (required) – The reference URL with which the screenshots are compared
  • url (required) – The URL which should be checked
  • reportPath (optional) – The folder to which the report should be saved
  • viewports (required) – a list of viewports that should be checked
    • label – The label of the screenshots and viewport
    • width – The width for the viewport
    • height – The height for the viewport
  • scenarios (optional) – Settings for all of the scenarios. Please check out the BackstopJs documentation for available settings
  • crawlers (optional) – Settings for the crawler before screenshots are taken
    • maxDepthToFollow – The depth of links to follow
    • maxConcurrentConnections – Maximum of links to follow at once
    • fileExtensions – A list of url/file extensions that should be checked. If this list is empty, all links will be followed!
    • assetFileExtensions – A list of url/file extensions that should not be checked. If this property is omitted, we apply the default settings from the example above!
  • backstop (optional) – Settings for BackstopJS comparison.

Contact

You have questions or need help? Feel free to mail us [email protected]