cmd -> command

This commit is contained in:
Nycki 2024-11-30 19:37:11 -08:00
parent 360dc2b055
commit d209608106

View file

@ -13,14 +13,14 @@ async function main() {
const fileOut = `${dirOut}/${file.name}.webp`;
const lossless = file.ext === '.png';
const cmd = [
const command = [
`magick "${fileIn}"`,
`-define webp:lossless=${lossless}`,
`-define webp:target-size=200kb`,
`"${fileOut}"`,
].join(' ');
console.log(cmd);
exec(cmd, (_err, stdout, stderr) => console.log(stdout + stderr));
console.log(command);
exec(command, (_err, stdout, stderr) => console.log(stdout + stderr));
}
}