MCPcopy Index your code
hub / github.com/code-forge-io/react-router-devtools / refHasPath

Function refHasPath

docs/scripts/generate-docs.ts:74–80  ·  view source on GitHub ↗
(ref: string, pathFromRepoRoot: string)

Source from the content-addressed store, hash-verified

72const REPO_ROOT = run("git rev-parse --show-toplevel", { cwd: currentDocsWorkspace });
73
74function refHasPath(ref: string, pathFromRepoRoot: string): boolean {
75 const p = pathFromRepoRoot.replace(/^\/+/, "").replace(/\/+$/, "");
76 try {
77 run(`git -C "${REPO_ROOT}" rev-parse --verify --quiet "${ref}:${p}"`);
78 return true;
79 } catch { return false; }
80}
81
82function buildDocs(sourceDir: string, outDir: string) {
83 if (!existsSync(sourceDir)) throw new Error(`Docs workspace not found: ${sourceDir}`);

Callers 1

generate-docs.tsFile · 0.85

Calls 1

runFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…