Chore: fix android build

This commit is contained in:
Pieter Vander Vennet 2025-05-03 15:23:17 +02:00
parent 07d5c85971
commit 82905fee3f
3 changed files with 23 additions and 8 deletions

View file

@ -3,6 +3,7 @@ import { Utils } from "../src/Utils"
import { Eli, EliEntry } from "./@types/eli"
import fs from "fs"
import { BingRasterLayer } from "../src/UI/Map/BingRasterLayer"
import ScriptUtils from "./ScriptUtils"
class DownloadEli extends Script {
constructor() {
@ -14,7 +15,6 @@ class DownloadEli extends Script {
// Target should use '.json' instead of '.geojson', as the latter cannot be imported by the build systems
const target = args[0] ?? "public/assets/data/editor-layer-index.json"
const targetGlobal = args[1] ?? "src/assets/generated/editor-layer-index-global.json"
const targetBing = args[0] ?? "src/assets/bing.json"
const eli: Eli = await Utils.downloadJson(url)
@ -121,8 +121,10 @@ class DownloadEli extends Script {
} else {
console.log("No bing entry found")
}
ScriptUtils.createParentDir(target)
fs.writeFileSync(target, contents, { encoding: "utf8" })
console.log("Written", keptLayers.length + ", entries to the ELI")
ScriptUtils.createParentDir(targetGlobal)
fs.writeFileSync(targetGlobal, JSON.stringify(contentsGlobal, null, " "), {
encoding: "utf8",
})