mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-21 06:01:06 +01:00
fix(scripts): use bun's glob api correctly
This commit is contained in:
parent
cda50448db
commit
7150bf4a44
1 changed files with 3 additions and 6 deletions
|
@ -19,14 +19,11 @@ if (!files.some((f) => f.includes("tags"))) process.exit(0);
|
|||
|
||||
const errors: string[] = [];
|
||||
|
||||
const TAGS_PATH = join(import.meta.dir, "..", "..", "data", "tags");
|
||||
const tags: Tag[] = [];
|
||||
const tagPaths = Array.from(
|
||||
new Glob(
|
||||
join(import.meta.dir, "..", "..", "..", "data", "tags", "*.md")
|
||||
).scanSync()
|
||||
);
|
||||
const tagPaths = Array.from(new Glob("*.md").scanSync(TAGS_PATH));
|
||||
for (const tagPath of tagPaths) {
|
||||
const content = readFileSync(tagPath);
|
||||
const content = readFileSync(join(TAGS_PATH, tagPath));
|
||||
const frontMatter = matter(content);
|
||||
|
||||
tags.push({
|
||||
|
|
Loading…
Reference in a new issue