Fixed the build, turns out the maps-svg was too complicated

This commit is contained in:
Pieter Vander Vennet 2020-09-20 20:28:35 +02:00
parent a9e823d051
commit c3e8a18789
4 changed files with 37 additions and 9284 deletions

View file

@ -125,11 +125,13 @@ function createIcon(iconPath: string, size: number) {
readFileSync(newname);
return newname; // File already exists - nothing to do
} catch (e) {
// Errors are normal here if this file exists
}
console.log("Creating icon ", name, newname)
try{
svg2img(iconPath,
// @ts-ignore
{width: size, height: size, preserveAspectRatio: true})
@ -139,6 +141,11 @@ function createIcon(iconPath: string, size: number) {
}).catch((error) => {
console.log("ERROR while writing" + iconPath, error)
});
}catch(e){
console.error("Could not read icon",iconPath,"due to",e)
}
return newname;
}