1.1.3 • Published 4 years ago

@nomadinteractive/screenshot-tool v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Screenshot CLI Tool

Screenshot automation tool using puppeteer. Pupetteer uses headless chrome for page rendering and screenshot taking purposes.

Installation

npm install -g @nomadinteractive/screenshot-tool

Configuration

Create pages.js with defining the pages you want to take screenshots of like:

module.exports = [
	{ name: "Google", url: "https://google.com" },
	{ name: "Wordpress", url: "https://wordpress.org/" },
];

and list of resolutions.js you want for the pages to be captured. The module should export either a simple array or a constructor method with accepting the pupeteer instance as single parameter and return the list of resolutions. Example:

module.exports = (puppeteer) => [
	{ name: 'Desktop', width: 1600, height: 0 },
	{ name: 'Mobile', emulate: puppeteer.devices['iPhone X'] }
];

Running

Run ss in the folder you have pages.js and resolutions.js.

Parameters

--pages custom-page-list.js

Default: pages.js

--resolutions custom-screen-sizes.js

Default: resolutions.js

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago