From 34a06192d1cc513b4d6c7288917eb3d2c10e7f92 Mon Sep 17 00:00:00 2001 From: Sebastian Goeb Date: Sun, 10 Dec 2023 20:30:35 +0100 Subject: [PATCH] fix: move static assets to public folder (#18) --- {src/assets => public}/new_hsk.tsv | 0 {src/assets => public}/new_hsk_anki_notes.tsv | 0 {src/assets => public}/old_hsk.tsv | 0 src/hsk/anki.ts | 2 +- src/hsk/hsk.ts | 2 +- src/hsk/pleco.ts | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename {src/assets => public}/new_hsk.tsv (100%) rename {src/assets => public}/new_hsk_anki_notes.tsv (100%) rename {src/assets => public}/old_hsk.tsv (100%) diff --git a/src/assets/new_hsk.tsv b/public/new_hsk.tsv similarity index 100% rename from src/assets/new_hsk.tsv rename to public/new_hsk.tsv diff --git a/src/assets/new_hsk_anki_notes.tsv b/public/new_hsk_anki_notes.tsv similarity index 100% rename from src/assets/new_hsk_anki_notes.tsv rename to public/new_hsk_anki_notes.tsv diff --git a/src/assets/old_hsk.tsv b/public/old_hsk.tsv similarity index 100% rename from src/assets/old_hsk.tsv rename to public/old_hsk.tsv diff --git a/src/hsk/anki.ts b/src/hsk/anki.ts index 6b3ab9d..a79661e 100644 --- a/src/hsk/anki.ts +++ b/src/hsk/anki.ts @@ -3,7 +3,7 @@ import { Revision } from "./hsk"; export async function getWordIntervals( _revision: Revision, ): Promise> { - const res = await fetch("src/assets/new_hsk_anki_notes.tsv"); + const res = await fetch("new_hsk_anki_notes.tsv"); const text = await res.text(); const map = new Map(); text.split("\n").forEach((line) => { diff --git a/src/hsk/hsk.ts b/src/hsk/hsk.ts index 2c32bc4..32da2e1 100644 --- a/src/hsk/hsk.ts +++ b/src/hsk/hsk.ts @@ -18,7 +18,7 @@ export enum Revision { export async function getWordsTsv(revision: Revision): Promise { const prefix = revision === Revision.NEW ? "new" : "old"; - const res = await fetch(`src/assets/${prefix}_hsk.tsv`); + const res = await fetch(`${prefix}_hsk.tsv`); return wordsTsvToJson(await res.text()); } diff --git a/src/hsk/pleco.ts b/src/hsk/pleco.ts index e0fe1c6..aa8bf94 100644 --- a/src/hsk/pleco.ts +++ b/src/hsk/pleco.ts @@ -3,7 +3,7 @@ import { Revision } from "./hsk"; export async function getFakeWordIntervals( _revision: Revision, ): Promise> { - const res = await fetch("src/assets/old_hsk.tsv"); + const res = await fetch("old_hsk.tsv"); const text = await res.text(); const map = new Map(); text