Fix: index.htmlでロゴのパスが誤っている問題を修正 / New: ディレクトリを探す関数
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { existsSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
|
||||
export function findDir(
|
||||
targetPath: string,
|
||||
cwd: string,
|
||||
): string {
|
||||
let current = cwd;
|
||||
|
||||
while (true) {
|
||||
const candidate = join(current, targetPath);
|
||||
|
||||
if (existsSync(candidate)) {
|
||||
return candidate;
|
||||
}
|
||||
|
||||
const parent = dirname(current);
|
||||
|
||||
if (parent === current) {
|
||||
throw new Error(`Not found: ${targetPath}`);
|
||||
}
|
||||
|
||||
current = parent;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>LynqChat</title>
|
||||
<link rel="icon" href="/lynqchat.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="/assets/lynqchat.svg" type="image/svg+xml">
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class="loading">
|
||||
<img
|
||||
class="logo"
|
||||
src="/lynqchat.svg"
|
||||
src="/assets/lynqchat.svg"
|
||||
/>
|
||||
|
||||
<div class="progress" />
|
||||
|
||||
Reference in New Issue
Block a user