MCPcopy Create free account
hub / github.com/TailGrids/tailgrids / getFileContent

Function getFileContent

apps/docs/src/utils/get-file-content.ts:4–16  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

2import path from "node:path";
3
4export function getFileContent(filePath: string) {
5 try {
6 const data = fs
7 .readFileSync(path.join(process.cwd(), filePath), {
8 encoding: "utf8"
9 })
10 .replaceAll("@/registry/core/", "@/components/tailgrids/core/");
11
12 return data;
13 } catch (error) {
14 console.log(error);
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected