snapage-cli

1.1.3 • Public • Published

snapage-cli

snap a web page cli

install

yarn add snapage

usage

snapage https://google.com -v '800x600' 'iPad Pro' -s 'filter: grayscale(100%)'

api

async snap(url: string, options?: SnapageOptions): Promise<Array<Buffer>>;

options

see snapage for options

option coercion

when providing snapage with --viewports, -v or --style, -s,
snapage-cli will coerece the input to suit the expected input by snapage.

style

when providing styles - it will be applied to the body element (future release will include class based css). the provided styles should be sperated by a colon (:) and different styles separated by semi-colon (;).
for example: snapage https://google.com -s 'border: 1px solid red; filter: scale(1.1);'

viewports

when providing viewport sizes (as opposed to device name such as iPad Pro) - use a x seperator between width and height.
for example: snapapage https://github.com -v '800x600' '1240x1080' 'iPhone X'

Readme

Keywords

Package Sidebar

Install

npm i snapage-cli

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

9.25 kB

Total Files

8

Last publish

Collaborators

  • tool3