forked from MapComplete/MapComplete
		
	Housekeeping...
This commit is contained in:
		
							parent
							
								
									707b25529b
								
							
						
					
					
						commit
						6d822b42ca
					
				
					 158 changed files with 7939 additions and 11272 deletions
				
			
		|  | @ -22,7 +22,7 @@ import { PrepareTheme } from "../Models/ThemeConfig/Conversion/PrepareTheme" | |||
| import { DesugaringContext } from "../Models/ThemeConfig/Conversion/Conversion" | ||||
| import { Utils } from "../Utils" | ||||
| import { AllKnownLayouts } from "../Customizations/AllKnownLayouts" | ||||
| import {Script} from "vm"; | ||||
| import { Script } from "vm" | ||||
| 
 | ||||
| // This scripts scans 'assets/layers/*.json' for layer definition files and 'assets/themes/*.json' for theme definition files.
 | ||||
| // It spits out an overview of those to be used to load them
 | ||||
|  | @ -204,15 +204,17 @@ class LayerOverviewUtils { | |||
|             "assets/SocialImageTemplateWide.svg", | ||||
|             "assets/SocialImageBanner.svg", | ||||
|             "assets/svg/osm-logo.svg", | ||||
|             "assets/templates/*" | ||||
|             "assets/templates/*", | ||||
|         ] | ||||
|         for (const path of allSvgs) { | ||||
|             if (exempt.some((p) => { | ||||
|                 if(p.endsWith("*") && path.startsWith("./"+p.substring(0, p.length - 1))){ | ||||
|                     return true | ||||
|                 } | ||||
|                 return "./" + p === path; | ||||
|             })) { | ||||
|             if ( | ||||
|                 exempt.some((p) => { | ||||
|                     if (p.endsWith("*") && path.startsWith("./" + p.substring(0, p.length - 1))) { | ||||
|                         return true | ||||
|                     } | ||||
|                     return "./" + p === path | ||||
|                 }) | ||||
|             ) { | ||||
|                 continue | ||||
|             } | ||||
| 
 | ||||
|  | @ -296,10 +298,13 @@ class LayerOverviewUtils { | |||
| 
 | ||||
|         this.checkAllSvgs() | ||||
| 
 | ||||
|         new DetectDuplicateFilters().convertStrict({ | ||||
|             layers: ScriptUtils.getLayerFiles().map(f => f.parsed), | ||||
|             themes: ScriptUtils.getThemeFiles().map(f => f.parsed) | ||||
|         }, "GenerateLayerOverview:") | ||||
|         new DetectDuplicateFilters().convertStrict( | ||||
|             { | ||||
|                 layers: ScriptUtils.getLayerFiles().map((f) => f.parsed), | ||||
|                 themes: ScriptUtils.getThemeFiles().map((f) => f.parsed), | ||||
|             }, | ||||
|             "GenerateLayerOverview:" | ||||
|         ) | ||||
| 
 | ||||
|         if (AllKnownLayouts.getSharedLayersConfigs().size == 0) { | ||||
|             console.error("This was a bootstrapping-run. Run generate layeroverview again!") | ||||
|  |  | |||
|  | @ -262,10 +262,8 @@ function main(args: string[]) { | |||
|     } | ||||
| 
 | ||||
|     let contents = ScriptUtils.readDirRecSync("./assets") | ||||
|         .filter(p => !p.startsWith("./assets/templates/")) | ||||
|         .filter( | ||||
|         (entry) => entry.indexOf("./assets/generated") != 0 | ||||
|     ) | ||||
|         .filter((p) => !p.startsWith("./assets/templates/")) | ||||
|         .filter((entry) => entry.indexOf("./assets/generated") != 0) | ||||
|     let licensePaths = contents.filter((entry) => entry.indexOf("license_info.json") >= 0) | ||||
|     let licenseInfos = generateLicenseInfos(licensePaths) | ||||
| 
 | ||||
|  |  | |||
|  | @ -588,7 +588,7 @@ function MergeTranslation(source: any, target: any, language: string, context: s | |||
|                 continue | ||||
|             } | ||||
| 
 | ||||
|             if(sourceV === ""){ | ||||
|             if (sourceV === "") { | ||||
|                 console.log("Ignoring empty string in the translations") | ||||
|             } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue