snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
7
apps/v4/lib/read-file.ts
Normal file
7
apps/v4/lib/read-file.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user