1.4.0 • Published 4 years ago
snapify v1.4.0
snapify
take beautiful page screenshots
install
yarn add snapify
usage
const snap = require('./snapify');
(async () => {
await snap('https://apple.com', {
viewports: ['iPad Pro'],
fullPage: true,
style: {
filter: 'grayscale(100%)'
}
});
})();
features
✅ plug and play
✅ element screenshots
✅ custom css styles
✅ custom pre-snap script
✅ supports all chrome emulated devices and their orientation
✅ supports lazy loaded content by scrolling the page
✅ uses puppeteer-cluster for concurrenct screenshots
api
async snap(url: string, options?: SnapifyOptions): Promise<Array<Buffer>>;
options
name
string
location
string
viewports
[{width, height}, 'emulatedDevice']
style
string
script
string
fullPage
boolean
scroll
boolean
persist
boolean