(dir: string)
| 2 | import { readLines, scanFiles, writeFileLines } from './util.ts'; |
| 3 | |
| 4 | export function main(dir: string) { |
| 5 | console.log('Fetching HackMD content...'); |
| 6 | |
| 7 | scanFiles(dir, async (file: string) => { |
| 8 | if (file.endsWith('.mdx')) { |
| 9 | const fetchLocation = await readFetch(file); |
| 10 | if (fetchLocation) { |
| 11 | console.log(file, '<==', fetchLocation); |
| 12 | const lines = await readLines(fetchLocation); |
| 13 | await writeFileLines(file, lines); |
| 14 | } |
| 15 | } |
| 16 | }); |
| 17 | } |
| 18 | |
| 19 | const KEY_VALUE = /^(.\w+):\s+(.*)$/; |
| 20 |
no test coverage detected
searching dependent graphs…