MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / indexProject

Function indexProject

__tests__/react-router.test.ts:838–842  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

836}
837
838async function indexProject(files: Record<string, string>): Promise<{ root: string; cg: CodeGraph }> {
839 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-rr-tables-'));
840 writeFiles(root, files);
841 return { root, cg: await CodeGraph.init(root, { index: true }) };
842}
843
844/** `path -> Component` for what each route renders, `path ~> Layout` for each layout around it. */
845function routeBindings(cg: CodeGraph): string[] {

Callers 2

freshFunction · 0.70

Calls 3

writeFilesFunction · 0.70
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected