chore: format

This commit is contained in:
C4illin
2024-09-12 12:59:59 +02:00
parent 16b322d4e6
commit e6a94fb21d

View File

@@ -9,7 +9,6 @@ export const properties = {
}, },
}; };
export function convert( export function convert(
filePath: string, filePath: string,
fileType: string, fileType: string,
@@ -19,23 +18,20 @@ export function convert(
options?: any, options?: any,
): Promise<string> { ): Promise<string> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
exec( exec(`resvg "${filePath}" "${targetPath}"`, (error, stdout, stderr) => {
`resvg "${filePath}" "${targetPath}"`, if (error) {
(error, stdout, stderr) => { reject(`error: ${error}`);
if (error) { }
reject(`error: ${error}`);
}
if (stdout) { if (stdout) {
console.log(`stdout: ${stdout}`); console.log(`stdout: ${stdout}`);
} }
if (stderr) { if (stderr) {
console.error(`stderr: ${stderr}`); console.error(`stderr: ${stderr}`);
} }
resolve("success"); resolve("success");
}, });
);
}); });
} }