When filtering theme files, be a bit more strict

Depending on your text editor, it can happen that there are temporary
files in your themes directory which cause errors during while executing
the generateLayerOverview.ts script.
This commit is contained in:
Sebastian Kürten 2021-05-13 08:08:59 +02:00
parent a482c5b1d0
commit 31bb3bf4be

View file

@ -29,7 +29,7 @@ const layerFiles = ScriptUtils.readDirRecSync("./assets/layers")
}
})
const themeFiles: any[] = ScriptUtils.readDirRecSync("./assets/themes")
.filter(path => path.indexOf(".json") > 0)
.filter(path => path.endsWith(".json"))
.filter(path => path.indexOf("license_info.json") < 0)
.map(path => {
return JSON.parse(readFileSync(path, "UTF8"));