1.1.1 • Published 10 years ago

hydra-screenshot v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Hydra Screenshot

travis build

Hydra screenshot is a wrapper around nightmare and deeply inspired by pageres. Hydra capture screenshot in many resolution and support localStorage.

Install

$ npm install hydra-screenshot --save

Usage

const Hydra = require('hydra-screenshot');

const hydra = new Hydra({delay: 2})
  .src('http://netflix.com', ['1280x1024', '1920x1080'], {localStorage: {token: '123'}})
  .src('http://google.com', ['iphone 5s', 'xiaomi mi-3'])
  .dest(__dirname)
  .run()
  .then(() => console.log('done'));

API

Hydra(options)

options

delay

Type: number (seconds)

Delay between each page

hydra.src(url, sizes, options)

url

required Type: string

sizes

Type: array

Use a <width>x<height> notation or a keyword.

A keyword is a version of a device from this list.

options

Type: object

localStorage

Type: object

Map of key: value

hydra.dest(path)

path

required Type: string

Path for screenshots

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago