snapage-cli
v1.1.3
Published
cli for snapage
Downloads
5
Readme
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'