diff --git a/apps/icon-pack-builder/src/index.ts b/apps/icon-pack-builder/src/index.ts index 0df1b7733..028155489 100644 --- a/apps/icon-pack-builder/src/index.ts +++ b/apps/icon-pack-builder/src/index.ts @@ -14,6 +14,7 @@ process.env.NODE_ENV = "development"; async function main() { const outputDir = join(__dirname, "../../website/public/resources/icon-packs"); + const outputMetaDir = join(__dirname, "../../website/src/resources/icon-packs"); mkdirSync(outputDir, { recursive: true }); const i18n = await import("@triliumnext/server/src/services/i18n.js"); @@ -60,7 +61,7 @@ async function main() { await new Promise((resolve) => { fileOutputStream.on("finish", resolve); }); // Save meta. - const metaFilePath = join(outputDir, `${iconPack.name}.json`); + const metaFilePath = join(outputMetaDir, `${iconPack.name}.json`); writeFileSync(metaFilePath, JSON.stringify({ name: iconPack.name, file: zipFileName, diff --git a/apps/website/src/pages/Resources/Resources.tsx b/apps/website/src/pages/Resources/Resources.tsx index e5547fbe3..075990b66 100644 --- a/apps/website/src/pages/Resources/Resources.tsx +++ b/apps/website/src/pages/Resources/Resources.tsx @@ -7,9 +7,17 @@ import Card from "../../components/Card"; import Section from "../../components/Section"; import { usePageTitle } from "../../hooks"; -const iconPacksMeta = Object.values(import.meta.glob("../../../public/resources/icon-packs/*.json", { +interface IconPackMeta { + name: string; + file: string; + version: string; + website: string; + description: string; +} + +const iconPacksMeta = Object.values(import.meta.glob("../../../src/resources/icon-packs/*.json", { eager: true -})); +})) as IconPackMeta[]; export default function Resources() { const { t } = useTranslation(); diff --git a/apps/website/public/resources/icon-packs/Boxicons 3 (Basic).json b/apps/website/src/resources/icon-packs/Boxicons 3 (Basic).json similarity index 100% rename from apps/website/public/resources/icon-packs/Boxicons 3 (Basic).json rename to apps/website/src/resources/icon-packs/Boxicons 3 (Basic).json diff --git a/apps/website/public/resources/icon-packs/Boxicons 3 (Brands).json b/apps/website/src/resources/icon-packs/Boxicons 3 (Brands).json similarity index 100% rename from apps/website/public/resources/icon-packs/Boxicons 3 (Brands).json rename to apps/website/src/resources/icon-packs/Boxicons 3 (Brands).json diff --git a/apps/website/public/resources/icon-packs/Material Design Icons.json b/apps/website/src/resources/icon-packs/Material Design Icons.json similarity index 100% rename from apps/website/public/resources/icon-packs/Material Design Icons.json rename to apps/website/src/resources/icon-packs/Material Design Icons.json diff --git a/apps/website/public/resources/icon-packs/Phosphor Icons (Fill).json b/apps/website/src/resources/icon-packs/Phosphor Icons (Fill).json similarity index 100% rename from apps/website/public/resources/icon-packs/Phosphor Icons (Fill).json rename to apps/website/src/resources/icon-packs/Phosphor Icons (Fill).json diff --git a/apps/website/public/resources/icon-packs/Phosphor Icons (Regular).json b/apps/website/src/resources/icon-packs/Phosphor Icons (Regular).json similarity index 100% rename from apps/website/public/resources/icon-packs/Phosphor Icons (Regular).json rename to apps/website/src/resources/icon-packs/Phosphor Icons (Regular).json