diff --git a/scripts/generateIncludedImages.ts b/scripts/generateIncludedImages.ts index 95c67aa620..69e01a98fd 100644 --- a/scripts/generateIncludedImages.ts +++ b/scripts/generateIncludedImages.ts @@ -1,4 +1,5 @@ import * as fs from "fs" +import Constants from "../Models/Constants"; function genImages(dryrun = false) { console.log("Generating images") @@ -32,19 +33,16 @@ function genImages(dryrun = false) { const name = path.substring(0, path.length - 4).replace(/[ -]/g, "_") if (dryrun) { - svg = "xxx" + svg = "" } let rawName = name - if (dryrun) { - rawName = "add" - } module += ` public static ${name} = "${svg}"\n` module += ` public static ${name}_img = Img.AsImageElement(Svg.${rawName})\n` module += ` public static ${name}_svg() { return new Img(Svg.${rawName}, true);}\n` - module += ` public static ${name}_ui() { return new FixedUiElement(Svg.${rawName}_img);}\n\n` - if (!dryrun) { + // module += ` /**@deprecated*/ public static ${name}_ui() { return new FixedUiElement(Svg.${rawName}_img);}\n\n` + if (Constants.defaultPinIcons.indexOf(name) >= 0 && !dryrun) { allNames.push(`"${path}": Svg.${name}`) } } @@ -54,4 +52,4 @@ function genImages(dryrun = false) { console.log("Done") } -genImages() +genImages(false)