Cut iconify

This commit is contained in:
2026-05-21 20:59:02 +04:00
parent 73dfd4e750
commit 95342ae758
27 changed files with 733 additions and 686 deletions

View File

@@ -0,0 +1,17 @@
import { readFileSync } from "fs";
import { join } from "path";
const inventoryPath = join(import.meta.dirname, "../src/generated/icon-inventory.json");
export function loadIconInventory() {
return JSON.parse(readFileSync(inventoryPath, "utf8"));
}
export function toAstroIconInclude(inventory) {
/** @type {Record<string, string[]>} */
const include = {};
for (const [prefix, icons] of Object.entries(inventory)) {
include[prefix] = icons;
}
return include;
}