mirror of
https://github.com/zadam/trilium.git
synced 2026-02-08 15:37:03 +01:00
chore(website): fix warnings & type issue
This commit is contained in:
@@ -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<void>((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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user