gulp-webshot
Webshot provides a simple API for taking webpage screenshots. The module is a light wrapper around PhantomJS, which utilizes WebKit to perform the page rendering.
Uses the webshot library.
npm install --save-dev gulp-webshot
/theme/stuff.html
:
or
/app/stuff.html
:
var gulp = require('gulp'),
webshot=require('gulp-webshot');
gulp.task('webshot', function() {
return gulp.src('./Theme/**/**.html')
.pipe(webshot({ dest:'build/',root:'Theme'}));
})
gulp.task('shot', ['webshot']);
gulp shot
Type: string
Type: string
Type: object
width: `int`
height: `int`
Type: object
width: `int`
height: `int`
Type: boolean|string
Flatten out captures.
Type: string
Example: -mobile
Type: string
Possible values are 'png', 'jpg', and 'jpeg'.
Type: int
JPEG compression quality. (%)
more options checkout webshot options.