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

Function index

__tests__/jsx-render-work.test.ts:32–39  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

30 });
31
32 async function index(files: Record<string, string>): Promise<CodeGraph> {
33 tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-jsx-work-'));
34 fs.writeFileSync(path.join(tmpDir, 'package.json'), '{"dependencies":{"react":"^18.0.0"}}');
35 for (const [file, content] of Object.entries(files)) fs.writeFileSync(path.join(tmpDir, file), content);
36 cg = CodeGraph.initSync(tmpDir);
37 await cg.indexAll();
38 return cg;
39 }
40
41 /** What each named function renders, by jsx-render edge. */
42 const renders = (graph: CodeGraph, name: string): string[] => {

Callers 1

Calls 3

initSyncMethod · 0.80
joinMethod · 0.45
indexAllMethod · 0.45

Tested by

no test coverage detected