(root: string, files: Files)
| 55 | } |
| 56 | |
| 57 | function write(root: string, files: Files): void { |
| 58 | for (const [file, text] of Object.entries(files)) { |
| 59 | fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true }); |
| 60 | fs.writeFileSync(path.join(root, file), text); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | async function index(root: string): Promise<CodeGraph> { |
| 65 | const graph = await CodeGraph.init(root, { index: true }); |