mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Add support for no-value encoder flags
This commit is contained in:
@@ -121,13 +121,15 @@ async function processFiles(files) {
|
||||
if (!program[encName]) {
|
||||
continue;
|
||||
}
|
||||
const encParam =
|
||||
typeof program[encName] === "string" ? program[encName] : "{}";
|
||||
const encConfig =
|
||||
program[encName].toLowerCase() === "auto"
|
||||
encParam.toLowerCase() === "auto"
|
||||
? "auto"
|
||||
: Object.assign(
|
||||
{},
|
||||
value.defaultEncoderOptions,
|
||||
JSON5.parse(program[encName])
|
||||
JSON5.parse(encParam)
|
||||
);
|
||||
const outputFile = join(program.outputDir, `${base}.${value.extension}`);
|
||||
jobsStarted++;
|
||||
|
||||
Reference in New Issue
Block a user