Take screenshots of your evolving front-end periodically during development.
This plugin requires Grunt
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-snapshots --save-dev
You must also have PhantomJS installed and have the
phantom executable in your PATH. See the PhantomJS home for installation instructions.
The "snapshots" task
In your project's Gruntfile, add a section named
snapshots to the data object passed into
filename: 'pic', path: 'tmp/custom/pics', extension: 'png', url: 'http://localhost:9001', unique: false
A string value that is used to do something with whatever.
Path to the folder in which to keep screenshots.
File extension to write to. Valid formats are
'gif', 'jpeg', 'pdf', and 'png'.
The URL of which to take screenshots. Use Grunt's
grunt-contrib-connect Plugin to open a server to test localhost.
This option will append a random string of alphanumeric characters to the end of each screenshot's filename.
This option will append a Unix timestamp to the end of each screenshot's filename.
This example will place a png screenshot of http://www.google.com inside a tmp/default/screenshots folder.
In this example, a screenshot is taken of a test index.html file is served on http://localhost:9001 from the
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
0.1.0 Initial release.