Themes: move generated themes into assets, remove known_themes, support pruning of borrowed icons

This commit is contained in:
Pieter Vander Vennet 2025-01-11 01:18:56 +01:00
parent 310b973846
commit ee64d84d27
18 changed files with 431 additions and 400 deletions

View file

@ -140,7 +140,7 @@ class AddIconSummary extends DesugaringStep<{ raw: LayerConfigJson; parsed: Laye
class LayerOverviewUtils extends Script {
public static readonly layerPath = "./src/assets/generated/layers/"
public static readonly themePath = "./src/assets/generated/themes/"
public static readonly themePath = "./public/assets/generated/themes/"
constructor() {
super("Reviews and generates the compiled themes")
@ -319,12 +319,12 @@ class LayerOverviewUtils extends Script {
keywords,
layers: theme.layers.filter((l) => sharedLayers.has(l["id"])).map((l) => l["id"]),
}
perId.set(theme.id, data)
perId.set(data.id, data)
}
const sorted = Constants.themeOrder.map((id) => {
if (!perId.has(id)) {
throw "Ordered theme id " + id + " not found"
throw "Ordered theme '" + id + "' not found"
}
return perId.get(id)
})