mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
13 lines
443 B
JavaScript
13 lines
443 B
JavaScript
import { join } from "https://deno.land/std@0.216.0/path/join.ts";
|
|
|
|
const src = JSON.parse(await Deno.readTextFile("./src/core.json"));
|
|
const usedFlags = [...new Set(src.events.map((e) => e.country + ".svg"))];
|
|
|
|
console.log(usedFlags);
|
|
|
|
const flagDir = "./dist/flags";
|
|
for await (const f of Deno.readDir(flagDir)) {
|
|
if (f.isDirectory || !usedFlags.includes(f.name)) {
|
|
await Deno.remove(join(flagDir, f.name), { recursive: true });
|
|
}
|
|
}
|