cmd -> command
This commit is contained in:
parent
360dc2b055
commit
d209608106
1 changed files with 3 additions and 3 deletions
|
@ -13,14 +13,14 @@ async function main() {
|
||||||
const fileOut = `${dirOut}/${file.name}.webp`;
|
const fileOut = `${dirOut}/${file.name}.webp`;
|
||||||
|
|
||||||
const lossless = file.ext === '.png';
|
const lossless = file.ext === '.png';
|
||||||
const cmd = [
|
const command = [
|
||||||
`magick "${fileIn}"`,
|
`magick "${fileIn}"`,
|
||||||
`-define webp:lossless=${lossless}`,
|
`-define webp:lossless=${lossless}`,
|
||||||
`-define webp:target-size=200kb`,
|
`-define webp:target-size=200kb`,
|
||||||
`"${fileOut}"`,
|
`"${fileOut}"`,
|
||||||
].join(' ');
|
].join(' ');
|
||||||
console.log(cmd);
|
console.log(command);
|
||||||
exec(cmd, (_err, stdout, stderr) => console.log(stdout + stderr));
|
exec(command, (_err, stdout, stderr) => console.log(stdout + stderr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue