device-shots 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -482,8 +482,9 @@ async function frameAndroidScreenshot(inputPath, outputPath) {
|
|
|
482
482
|
if (!match) return false;
|
|
483
483
|
const width = parseInt(match[1], 10);
|
|
484
484
|
const height = parseInt(match[2], 10);
|
|
485
|
-
const padding =
|
|
486
|
-
const
|
|
485
|
+
const padding = 30;
|
|
486
|
+
const innerRadius = 60;
|
|
487
|
+
const outerRadius = innerRadius + padding;
|
|
487
488
|
const totalW = width + padding * 2;
|
|
488
489
|
const totalH = height + padding * 2;
|
|
489
490
|
const uid = Date.now();
|
|
@@ -497,7 +498,7 @@ async function frameAndroidScreenshot(inputPath, outputPath) {
|
|
|
497
498
|
"-fill",
|
|
498
499
|
"white",
|
|
499
500
|
"-draw",
|
|
500
|
-
`roundrectangle 0,0 ${width - 1},${height - 1} ${
|
|
501
|
+
`roundrectangle 0,0 ${width - 1},${height - 1} ${innerRadius},${innerRadius}`,
|
|
501
502
|
tmpMask
|
|
502
503
|
]);
|
|
503
504
|
await runOrFail("magick", [
|
|
@@ -517,7 +518,7 @@ async function frameAndroidScreenshot(inputPath, outputPath) {
|
|
|
517
518
|
"-fill",
|
|
518
519
|
"black",
|
|
519
520
|
"-draw",
|
|
520
|
-
`roundrectangle 0,0 ${totalW - 1},${totalH - 1} ${
|
|
521
|
+
`roundrectangle 0,0 ${totalW - 1},${totalH - 1} ${outerRadius},${outerRadius}`,
|
|
521
522
|
tmpRounded,
|
|
522
523
|
"-gravity",
|
|
523
524
|
"center",
|
|
@@ -842,7 +843,7 @@ async function frameCommand(dir, options) {
|
|
|
842
843
|
var program = new Command();
|
|
843
844
|
program.name("device-shots").description(
|
|
844
845
|
"Capture and frame mobile app screenshots from iOS simulators and Android emulators"
|
|
845
|
-
).version("0.5.
|
|
846
|
+
).version("0.5.4");
|
|
846
847
|
program.command("capture").description("Capture screenshots from running devices").argument("[name]", "Screenshot name").option("-b, --bundle-id <id>", "App bundle ID").option("-o, --output <dir>", "Output directory").option("-p, --platform <platform>", "ios, android, or both").option("--no-frame", "Skip framing after capture").option("--time <time>", "Status bar time", "9:41").action(async (name, opts) => {
|
|
847
848
|
await captureCommand({ name, ...opts });
|
|
848
849
|
});
|