Update dependencies

This commit is contained in:
Kamran Ahmed
2024-02-15 18:12:34 +00:00
parent 7ba48523da
commit a9734c7eeb
4 changed files with 213 additions and 216 deletions
+4 -3
View File
@@ -11,15 +11,16 @@ async function getSVG(name: string) {
const filepath = `/src/icons/${name}.svg`;
const files = import.meta.glob<string>('/src/icons/**/*.svg', {
query: '?raw',
eager: true,
as: 'raw',
});
if (!(filepath in files)) {
throw new Error(`${filepath} not found`);
}
const root = parse(files[filepath]);
const root = parse(files[filepath].default as string);
const svg = root.querySelector('svg');
@@ -35,4 +36,4 @@ const { attributes: baseAttributes, innerHTML } = await getSVG(icon);
const svgAttributes = { ...baseAttributes, ...attributes };
---
<svg {...svgAttributes} set:html={innerHTML}></svg>
<svg {...svgAttributes} set:html={innerHTML} />
+1 -1
View File
@@ -62,7 +62,7 @@ export async function getAllQuestionGroups(): Promise<QuestionGroupType[]> {
`/src/data/question-groups/*/content/*.md`,
{
eager: true,
as: 'raw',
query: '?raw',
},
);