Skip to content

Commit

Permalink
Fix import statement in markdown.ts to use readdir instead of readDir…
Browse files Browse the repository at this point in the history
… for consistency and improved functionality
  • Loading branch information
PieterDePauw committed Nov 13, 2024
1 parent bc9a013 commit b323b31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sources/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */

import GithubSlugger from "github-slugger"
import { readFile, readDir, stat } from "fs/promises"
import { readFile, readdir, stat } from "fs/promises"
import { basename, dirname, join } from "path"
import { createHash } from "crypto"
import { ObjectExpression } from "estree"
Expand All @@ -30,7 +30,7 @@ export type Section = { content: string; heading?: string; slug?: string }
*/
export async function walk(dir: string, parentPath?: string): Promise<{ path: string; parentPath?: string }[]> {
// > Read the contents of the directory
const immediateFiles = await readDir(dir)
const immediateFiles = await readdir(dir)

// > Recursively walk the directory and return all files in the directory and subdirectories
const recursiveFiles = await Promise.all(
Expand Down

0 comments on commit b323b31

Please sign in to comment.