mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
8 lines
232 B
TypeScript
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")
|
|
}
|