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 🙏

© 2026 – Pkg Stats / Ryan Hefner

grunt-vigo

v0.1.9

Published

A simple visual regression testing tool using phantomJS 2

Readme

grunt-vigo

A simple event based declarative visual regression testing tool using phantomJS 2 for NodeJS and Grunt

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-vigo --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-vigo');

The "vigo" task

Overview

In your project's Gruntfile, add a section named vigo to the data object passed into grunt.initConfig().

grunt.initConfig({
   vigo: {
      default_options: {
        options: {
          baseImages : "test/expected/",
          outputImages : "test/results/"
        },
        files:  {
          example_testSuite : ['test/example_testSuite.js']
        }
      }
    },
});

Options

options.baseImages

Type: String Default value: ./base/

A string with a directory path in which Vigo can store and reference the base expectation screenshots for the test suite. If an image is missing from this directory when the test suite is run Vigo will automatically copy the first screenshot into this direcotry and use it as it's base of reference.

options.outputImages

Type: String Default value: ./results/

A string with a directory path in which Vigo can store any images generated as part of the test run to compare with the base images.

files

Type: Object Default value: {}

An object that includes references to javascript testsuite files that should be run as part of the build.

Usage Examples

simple configuration example

In this example, the first code snippet is the grunt configuration, which sets the base image directory, the output image directory and also includes one test suit 'example_testSuite.js'

grunt.initConfig({
   vigo: {
      default_options: {
        options: {
          baseImages : "test/expected/",
          outputImages : "test/results/"
        },
        files:  {
          example_testSuite : ['test/example_testSuite.js']
        }
      }
    },
});

simple test suite example

{
    "vigo": [
        {
            "name": "main navigation",
            "url": "http://trisis.co.uk",
            "selector": "#mainContent",
            "viewport" : { "width": 1280, "height": 1024}
        },
        {
            "name": "whole page",
            "url": "http://trisis.co.uk",
            "viewport" : { "width": 1280, "height": 1024}
        }
    ]
}

vigo

Type: array Default value: []

An array of objects each object is a test to run in the test suite.

vigo.object.name

Type: String Default value: ``

Required. The name of the test, should be unique and describe the test, will also be used as the filename to record screenshots under. Spaces will be replaced with underscore.

vigo.object.url

Type: String Default value: ``

Required. The url for phantomjs to open to run the test.

vigo.object.selector

Type: String Default value: ``

Optional. If you want to capture only specific parts of your page, you can include a DOM selector here, it must work with document.querySelector(selector)

vigo.object.viewport

Type: String Default value: { width: 1280, height: 1024 }

Optional. If you want to capture the page with different screensizes (helpful for responsive testing) you can specify different resolutions

Contributing

Contact me via github with any pull requests.

Release History

0.1.4 = first fully functioning release.