Files
shadcn-ui/apps/v4/lib/read-file.ts
shadcn 3fc793287b fix
2026-02-26 16:03:56 +04:00

8 lines
232 B
TypeScript

import { promises as fs } from "fs"
import path from "path"
export async function readFileFromRoot(relativePath: string) {
const absolutePath = path.join(process.cwd(), relativePath)
return fs.readFile(absolutePath, "utf-8")
}