forked from MapComplete/MapComplete
		
	Fixed the build, turns out the maps-svg was too complicated
This commit is contained in:
		
							parent
							
								
									a9e823d051
								
							
						
					
					
						commit
						c3e8a18789
					
				
					 4 changed files with 37 additions and 9284 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue