Browse Source

gen-screenshot: replace deprecated `Deno.run`

pull/45/head
D. Bohdan 1 year ago
parent
commit
fdf78ba150
  1. 19
      gen-screenshot.ts

19
gen-screenshot.ts

@ -49,9 +49,10 @@ try {
`screenshot/${screenshotFile}`,
);
await Deno.run({
cmd: [
await (new Deno.Command(
"convert",
{
args: [
"-resize",
"25%",
"-adaptive-sharpen",
@ -59,11 +60,13 @@ try {
`screenshot/${screenshotFile}`,
`thumbnail/${screenshotFile}`,
],
}).status();
stderr: "inherit",
stdout: "inherit",
},
)).output();
await Deno.run({
cmd: [
"optipng",
await (new Deno.Command("optipng", {
args: [
"-o",
"5",
"-strip",
@ -71,7 +74,9 @@ try {
`screenshot/${screenshotFile}`,
`thumbnail/${screenshotFile}`,
],
}).status();
stderr: "inherit",
stdout: "inherit",
})).output();
} catch (err) {
console.error(err);
} finally {

Loading…
Cancel
Save