Render screenshots of webpages and local html
A simple (naïve) wrapper for webshot that uses phantomJS to render webpages to various image formats.
For example generate preview images of your project to send to clients, update screenshots for your documentation or get creative with the browser rendering engine. Use webshot features like offsets, timers and a 'trigger' callback for interesting setups.
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-webshot --save-dev
grunt-webshot specific options are:
savePathare used as arguments to call the webshot method.
All other options are passed directly to webshot: see the documentation for a list of supported options.
gruntinitConfigwebshot:// examplehomepage:options:// url, file or htmlsiteType: 'url'site: ''savePath: './tmp/shot.png'windowSize:width: 1024height: 768shotSize:width: 1024height: 'all';
- 0.0.3 - Updated to webshot 0.8.1 (supports siteType:file), dropped own hack
- 0.0.2 - Updated dependency
- 0.0.1 - First release
Contributions are very welcome, please leave a ticket before doing something major.
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.