A simple command line tool to generate device screenshots of different webpages.
generate-device-screenshots requires Node version 7.10 or greater
To use generate-device-screenshots in your project, run:
npm i generate-device-screenshots
Then add the following to your package.json
file
"scripts":{
"generate-device-screenshots": "generate-device-screenshots"
}
Note: Installing generate-device-screenshots will install Puppeteer, a headless version of Chromium (~71Mb Mac, ~90Mb Linux, ~110Mb Win)
npm run generate-device-screenshots https://example.com "iPhone 6"
npm run generate-device-screenshots https://example.com "iPhone 6, Nexus 10, iPhone 4"
Generate screenshots from every device currently available in Google developer tools
npm run generate-device-screenshots https://example.com "all"
npm run generate-device-screenshots https://example.com "iPhone 6" fullscreen
npm run generate-device-screenshots https://example.com "iPhone 6" force-yes
npm run generate-device-screenshots <url> <devices> <fullscreen> <force-yes>
<url>
- Required
- Example: https://example.com
<devices>
- Required
- Example 1: "iPhone 6"
- Example 2: "iPhone 6, iPhone 5"
- Example 3: "all"
- Must be a valid and exact name from the list of available devices or "all" to use every device
<fullscreen>
- Optional
- Example: fullscreen
<force-yes>
- Optional
- Example: force-yes