-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jxmot/20210519-add_devices
Can select Puppeteer devices for snapshots
- Loading branch information
Showing
7 changed files
with
222 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
Blackberry PlayBook - 600 X 1024 | ||
Blackberry PlayBook landscape - 1024 X 600 | ||
BlackBerry Z30 - 360 X 640 | ||
BlackBerry Z30 landscape - 640 X 360 | ||
Galaxy Note 3 - 360 X 640 | ||
Galaxy Note 3 landscape - 640 X 360 | ||
Galaxy Note II - 360 X 640 | ||
Galaxy Note II landscape - 640 X 360 | ||
Galaxy S III - 360 X 640 | ||
Galaxy S III landscape - 640 X 360 | ||
Galaxy S5 - 360 X 640 | ||
Galaxy S5 landscape - 640 X 360 | ||
iPad - 768 X 1024 | ||
iPad landscape - 1024 X 768 | ||
iPad Mini - 768 X 1024 | ||
iPad Mini landscape - 1024 X 768 | ||
iPad Pro - 1024 X 1366 | ||
iPad Pro landscape - 1366 X 1024 | ||
iPhone 4 - 320 X 480 | ||
iPhone 4 landscape - 480 X 320 | ||
iPhone 5 - 320 X 568 | ||
iPhone 5 landscape - 568 X 320 | ||
iPhone 6 - 375 X 667 | ||
iPhone 6 landscape - 667 X 375 | ||
iPhone 6 Plus - 414 X 736 | ||
iPhone 6 Plus landscape - 736 X 414 | ||
iPhone 7 - 375 X 667 | ||
iPhone 7 landscape - 667 X 375 | ||
iPhone 7 Plus - 414 X 736 | ||
iPhone 7 Plus landscape - 736 X 414 | ||
iPhone 8 - 375 X 667 | ||
iPhone 8 landscape - 667 X 375 | ||
iPhone 8 Plus - 414 X 736 | ||
iPhone 8 Plus landscape - 736 X 414 | ||
iPhone SE - 320 X 568 | ||
iPhone SE landscape - 568 X 320 | ||
iPhone X - 375 X 812 | ||
iPhone X landscape - 812 X 375 | ||
iPhone XR - 414 X 896 | ||
iPhone XR landscape - 896 X 414 | ||
iPhone 11 - 414 X 828 | ||
iPhone 11 landscape - 828 X 414 | ||
iPhone 11 Pro - 375 X 812 | ||
iPhone 11 Pro landscape - 812 X 375 | ||
iPhone 11 Pro Max - 414 X 896 | ||
iPhone 11 Pro Max landscape - 896 X 414 | ||
JioPhone 2 - 240 X 320 | ||
JioPhone 2 landscape - 320 X 240 | ||
Kindle Fire HDX - 800 X 1280 | ||
Kindle Fire HDX landscape - 1280 X 800 | ||
LG Optimus L70 - 384 X 640 | ||
LG Optimus L70 landscape - 640 X 384 | ||
Microsoft Lumia 550 - 640 X 360 | ||
Microsoft Lumia 950 - 360 X 640 | ||
Microsoft Lumia 950 landscape - 640 X 360 | ||
Nexus 10 - 800 X 1280 | ||
Nexus 10 landscape - 1280 X 800 | ||
Nexus 4 - 384 X 640 | ||
Nexus 4 landscape - 640 X 384 | ||
Nexus 5 - 360 X 640 | ||
Nexus 5 landscape - 640 X 360 | ||
Nexus 5X - 412 X 732 | ||
Nexus 5X landscape - 732 X 412 | ||
Nexus 6 - 412 X 732 | ||
Nexus 6 landscape - 732 X 412 | ||
Nexus 6P - 412 X 732 | ||
Nexus 6P landscape - 732 X 412 | ||
Nexus 7 - 600 X 960 | ||
Nexus 7 landscape - 960 X 600 | ||
Nokia Lumia 520 - 320 X 533 | ||
Nokia Lumia 520 landscape - 533 X 320 | ||
Nokia N9 - 480 X 854 | ||
Nokia N9 landscape - 854 X 480 | ||
Pixel 2 - 411 X 731 | ||
Pixel 2 landscape - 731 X 411 | ||
Pixel 2 XL - 411 X 823 | ||
Pixel 2 XL landscape - 823 X 411 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
/* | ||
List all devices that Puppeteer contains: | ||
node listdevices.js | ||
Creates a text file listing all of the device names | ||
and their dimensions: | ||
Nexus 6P - 412 X 732 | ||
*/ | ||
// set up run-time logging first... | ||
const Log = require('simple-text-log'); | ||
const logOut = new Log({logfile:'./devicelist.txt',logsize:0}); | ||
// optionally also write to the console | ||
const logcon = true; | ||
function log(payload) { | ||
if(logcon) console.log(payload); | ||
logOut.write(payload); | ||
}; | ||
const puppeteer = require('puppeteer'); | ||
Object.keys(puppeteer.devices).forEach((key, idx) => { | ||
let dev = puppeteer.devices[key]; | ||
log(`${dev.name} - ${dev.viewport.width} X ${dev.viewport.height}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
Blackberry PlayBook - 600 X 1024 | ||
Blackberry PlayBook landscape - 1024 X 600 | ||
BlackBerry Z30 - 360 X 640 | ||
BlackBerry Z30 landscape - 640 X 360 | ||
Galaxy Note 3 - 360 X 640 | ||
Galaxy Note 3 landscape - 640 X 360 | ||
Galaxy Note II - 360 X 640 | ||
Galaxy Note II landscape - 640 X 360 | ||
Galaxy S III - 360 X 640 | ||
Galaxy S III landscape - 640 X 360 | ||
Galaxy S5 - 360 X 640 | ||
Galaxy S5 landscape - 640 X 360 | ||
iPad - 768 X 1024 | ||
iPad landscape - 1024 X 768 | ||
iPad Mini - 768 X 1024 | ||
iPad Mini landscape - 1024 X 768 | ||
iPad Pro - 1024 X 1366 | ||
iPad Pro landscape - 1366 X 1024 | ||
iPhone 4 - 320 X 480 | ||
iPhone 4 landscape - 480 X 320 | ||
iPhone 5 - 320 X 568 | ||
iPhone 5 landscape - 568 X 320 | ||
iPhone 6 - 375 X 667 | ||
iPhone 6 landscape - 667 X 375 | ||
iPhone 6 Plus - 414 X 736 | ||
iPhone 6 Plus landscape - 736 X 414 | ||
iPhone 7 - 375 X 667 | ||
iPhone 7 landscape - 667 X 375 | ||
iPhone 7 Plus - 414 X 736 | ||
iPhone 7 Plus landscape - 736 X 414 | ||
iPhone 8 - 375 X 667 | ||
iPhone 8 landscape - 667 X 375 | ||
iPhone 8 Plus - 414 X 736 | ||
iPhone 8 Plus landscape - 736 X 414 | ||
iPhone SE - 320 X 568 | ||
iPhone SE landscape - 568 X 320 | ||
iPhone X - 375 X 812 | ||
iPhone X landscape - 812 X 375 | ||
iPhone XR - 414 X 896 | ||
iPhone XR landscape - 896 X 414 | ||
iPhone 11 - 414 X 828 | ||
iPhone 11 landscape - 828 X 414 | ||
iPhone 11 Pro - 375 X 812 | ||
iPhone 11 Pro landscape - 812 X 375 | ||
iPhone 11 Pro Max - 414 X 896 | ||
iPhone 11 Pro Max landscape - 896 X 414 | ||
JioPhone 2 - 240 X 320 | ||
JioPhone 2 landscape - 320 X 240 | ||
Kindle Fire HDX - 800 X 1280 | ||
Kindle Fire HDX landscape - 1280 X 800 | ||
LG Optimus L70 - 384 X 640 | ||
LG Optimus L70 landscape - 640 X 384 | ||
Microsoft Lumia 550 - 640 X 360 | ||
Microsoft Lumia 950 - 360 X 640 | ||
Microsoft Lumia 950 landscape - 640 X 360 | ||
Nexus 10 - 800 X 1280 | ||
Nexus 10 landscape - 1280 X 800 | ||
Nexus 4 - 384 X 640 | ||
Nexus 4 landscape - 640 X 384 | ||
Nexus 5 - 360 X 640 | ||
Nexus 5 landscape - 640 X 360 | ||
Nexus 5X - 412 X 732 | ||
Nexus 5X landscape - 732 X 412 | ||
Nexus 6 - 412 X 732 | ||
Nexus 6 landscape - 732 X 412 | ||
Nexus 6P - 412 X 732 | ||
Nexus 6P landscape - 732 X 412 | ||
Nexus 7 - 600 X 960 | ||
Nexus 7 landscape - 960 X 600 | ||
Nokia Lumia 520 - 320 X 533 | ||
Nokia Lumia 520 landscape - 533 X 320 | ||
Nokia N9 - 480 X 854 | ||
Nokia N9 landscape - 854 X 480 | ||
Pixel 2 - 411 X 731 | ||
Pixel 2 landscape - 731 X 411 | ||
Pixel 2 XL - 411 X 823 | ||
Pixel 2 XL landscape - 823 X 411 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters