(root: string, files: Files)
| 41 | } |
| 42 | |
| 43 | function write(root: string, files: Files): void { |
| 44 | for (const [file, text] of Object.entries(files)) { |
| 45 | fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true }); |
| 46 | fs.writeFileSync(path.join(root, file), text); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | async function index(root: string): Promise<CodeGraph> { |
| 51 | const graph = await CodeGraph.init(root, { index: true }); |