diff --git a/scripts/generateIncludedImages.ts b/scripts/generateIncludedImages.ts
index 6b256bc70a..d31dd6b17d 100644
--- a/scripts/generateIncludedImages.ts
+++ b/scripts/generateIncludedImages.ts
@@ -1,118 +1,9 @@
import * as fs from "fs"
+import Script from "./Script"
function genImages(dryrun = false) {
console.log("Generating images")
- // These images are not referenced via 'Svg.ts' anymore and can be ignored
- const blacklist: string[] = [
- "add",
- "addSmall",
- "back",
- "circle",
- "blocked",
- "brick_wall",
- "brick_wall_raw",
- "brick_wall_round",
- "brick_wall_square",
- "bug",
- "center",
- "checkmark",
- "clock",
- "close",
- "community",
- "compass",
- "compass_arrow",
- "confirm",
- "copyright",
- "cross",
- "cross_bottom_right",
- "crosshair",
- "crosshair_locked",
- "crosshair-locked",
- "delete_not_allowed",
- "direction_gradient",
- "direction_stroke",
- "duplicate",
- "elevator",
- "elevator_wheelchair",
- "envelope",
- "eye",
- "filter",
- "filter_disable",
- "floppy",
- "gear",
- "gender_bi",
- "gender_inter",
- "gender_female",
- "gender_male",
- "gender_trans",
- "gender_queer",
- "generic_map",
- "gps_arrow",
- "hand",
- "help",
- "home",
- "length_crosshair",
- "length-crosshair",
- "liberapay",
- "location",
- "location_empty",
- "location_locked",
- "location_refused",
- "location-refused",
- "location_unlocked",
- "logo",
- "logout",
- "mapcomplete_logo",
- "mapillary",
- "mapillary_black",
- "mastodon",
- "min",
- "move",
- "move-arrows",
- "move_confirm",
- "move_not_allowed",
- "not_found",
- "osm_logo_us",
- "osm-logo-us",
- "party",
- "pencil",
- "person",
- "pin",
- "plantnet_logo",
- "plus",
- "reload",
- "resolved",
- "ring",
- "robot",
- "scissors",
- "search",
- "search_disable",
- "share",
- "SocialImageForeground",
- "speech_bubble",
- "speech_bubble_black_outline",
- "square",
- "square_rounded",
- "star",
- "star_half",
- "star_outline",
- "teardrop",
- "teardrop_with_hole_green",
- "statistics",
- "translate",
- "triangle",
- "up",
- "Upload",
- "wikidata",
- "wikimedia-commons-white",
- "wikimedia_commons_white",
- "wikipedia",
- "github",
- ].map((s) => s.toLowerCase())
const dir = fs.readdirSync("./assets/svg")
-
- let module =
- 'import Img from "./UI/Base/Img";\n\n/* @deprecated */\nexport default class Svg {\n\n\n'
for (const path of dir) {
if (path.endsWith("license_info.json")) {
continue
@@ -133,7 +24,7 @@ function genImages(dryrun = false) {
.replace(/\n/g, " ")
.replace(/\r/g, "")
.replace(/\\/g, "\\")
- .replace(/"/g, '\\"')
+ .replace(/"/g, "\\\"")
.replaceAll(" ", " ")
let hasNonAsciiChars = Array.from(svg)
@@ -147,35 +38,29 @@ function genImages(dryrun = false) {
const nameUC = name.toUpperCase().at(0) + name.substring(1)
const svelteCode =
- '\n' +
+ "\n" +
svg
.replace(
"