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