Add sunny unlabeld, fix label export
This commit is contained in:
parent
5984d0c19e
commit
5cd7f0976e
8 changed files with 2983 additions and 25 deletions
18
scripts/generateSunnyUnlabeled.ts
Normal file
18
scripts/generateSunnyUnlabeled.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { writeFileSync } from "fs"
|
||||
import Script from "./Script"
|
||||
import sunny from "../public/assets/sunny.json"
|
||||
|
||||
export class GenerateSunnyUnlabeled extends Script {
|
||||
constructor() {
|
||||
super("Generates 'sunny-unlabeled.json' based on sunny.json")
|
||||
}
|
||||
|
||||
async main(args: string[]): Promise<void> {
|
||||
const unlabeled = { "#":"AUTOMATICALLY GENERATED! Do not edit.", ...sunny }
|
||||
unlabeled.name = unlabeled.name+"-unlabeled"
|
||||
unlabeled.layers = sunny.layers.filter(l => l.type !== "symbol" || !l.layout["text-field"])
|
||||
writeFileSync("public/assets/sunny-unlabeled.json", JSON.stringify(unlabeled, null, " "))
|
||||
}
|
||||
}
|
||||
|
||||
new GenerateSunnyUnlabeled().run()
|
Loading…
Add table
Add a link
Reference in a new issue