screenshotter-cli
v1.0.0
Published
Experimenting with puppeteer and commander.js
Downloads
3
Maintainers
Readme
Screenshotter
Experimenting with puppeteer and commander.js to build a tool to take screenshots to any page from your command line.
Installation
npm install -g screenshotter-cli
Usage
Basic Example:
screenshotter --url https://github.com
With custom path:
screenshotter --url https://github.com --path ~/Public
With specific element;
screenshotter --url https://github.com --element ".jumbotron-codelines"
Emulate device:
screenshotter --url https://github.com --device "iPhone 6"
Options
| Name | Type | Default | Description |
|-------------|--------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| --url | string | N/A | The page URL to navigate to. |
| --element | string | N/A | Which element to screenshot instead of the full page. |
| --full-page | bool | true | Whether to screenshot the full page. |
| --width | int | N/A | Custom screenshot width. Depends on --full-page
to be false
|
| --height | int | N/A | Custom screenshot height. Depends on --full-page
to be false
|
| --device | string | N/A | Which device to emulate. List of all available devices is available in the source code: DeviceDescriptors.js. |
| --path | string | process.cwd() | Where to save the file generated by the screenshot action. By default it will save within the directory you are executing screenshotter
. |
Dependencies
License
Licensed under the MIT license.