mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
🛠️ Update fix-viewbox cli.
This commit is contained in:
parent
70488e2dd2
commit
8d649eaa1a
@ -24,14 +24,14 @@ async function fixViewbox() {
|
|||||||
.toString()
|
.toString()
|
||||||
.replace('<svg', `<svg viewBox="0 0 ${width} ${height}"`);
|
.replace('<svg', `<svg viewBox="0 0 ${width} ${height}"`);
|
||||||
await writeFile(filePath, newFileContent);
|
await writeFile(filePath, newFileContent);
|
||||||
message = `🔔 File ${file} has been fixed.\n`;
|
message = `🔔 File ${file} has been fixed.`;
|
||||||
console.log(message);
|
console.log(message);
|
||||||
} else {
|
} else {
|
||||||
message = `✅ File ${file} has already a viewBox.\n`;
|
message = `✅ File ${file} has already a viewBox.`;
|
||||||
console.log(message);
|
console.log(message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message = `❌ File ${file} is not a ${fileType} file.\n`;
|
message = `❌ File ${file} is not a ${fileType} file.`;
|
||||||
console.log(message);
|
console.log(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user