mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-24 15:21: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 errors: string[] = [];
|
||||||
|
|
||||||
|
const TAGS_PATH = join(import.meta.dir, "..", "..", "data", "tags");
|
||||||
const tags: Tag[] = [];
|
const tags: Tag[] = [];
|
||||||
const tagPaths = Array.from(
|
const tagPaths = Array.from(new Glob("*.md").scanSync(TAGS_PATH));
|
||||||
new Glob(
|
|
||||||
join(import.meta.dir, "..", "..", "..", "data", "tags", "*.md")
|
|
||||||
).scanSync()
|
|
||||||
);
|
|
||||||
for (const tagPath of tagPaths) {
|
for (const tagPath of tagPaths) {
|
||||||
const content = readFileSync(tagPath);
|
const content = readFileSync(join(TAGS_PATH, tagPath));
|
||||||
const frontMatter = matter(content);
|
const frontMatter = matter(content);
|
||||||
|
|
||||||
tags.push({
|
tags.push({
|
||||||
|
|
Loading…
Reference in a new issue