chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-09-07 22:49:44 +02:00
parent ebc48f6b53
commit e7de94576f
232 changed files with 11430 additions and 3365 deletions

View file

@ -14,20 +14,24 @@ import { GenerateLicenseInfo } from "./generateLicenseInfo"
class ImportCustomTheme extends Script {
constructor() {
super(["Given the path of a custom layer, will load the layer into mapcomplete as official","",
"Usage:",
"vite-node scripts/importCustomTheme.ts <path-of-layer-or-theme>"].join("\n"))
super(
[
"Given the path of a custom layer, will load the layer into mapcomplete as official",
"",
"Usage:",
"vite-node scripts/importCustomTheme.ts <path-of-layer-or-theme>",
].join("\n")
)
}
async main(args: string[]) {
if(args.length === 0){
if (args.length === 0) {
this.printHelp()
return
}
const path = args[0]
const layerconfig = <LayerConfigJson>JSON.parse(
readFileSync(path, "utf-8"))
const layerconfig = <LayerConfigJson>JSON.parse(readFileSync(path, "utf-8"))
const id = layerconfig.id
const dirPath = "./assets/layers/" + id
if (!existsSync(dirPath)) {