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

Function indexProject

__tests__/vue-tsx-script.test.ts:76–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74});
75
76async function indexProject(): Promise<CodeGraph> {
77 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-vue-tsx-'));
78 roots.push(root);
79 for (const [file, text] of Object.entries(PROJECT)) {
80 fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true });
81 fs.writeFileSync(path.join(root, file), text);
82 }
83 const graph = await CodeGraph.init(root, { index: true });
84 graphs.push(graph);
85 return graph;
86}
87
88const named = (nodes: Node[], kind: string, name: string) => nodes.find((n) => n.kind === kind && n.name === name);
89

Callers 1

Calls 3

pushMethod · 0.80
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected