MCPcopy
hub / github.com/QwikDev/qwik / main

Function main

scripts/docs_sync/fetch_hackmd.ts:4–17  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

2import { readLines, scanFiles, writeFileLines } from './util.ts';
3
4export 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
19const KEY_VALUE = /^(.\w+):\s+(.*)$/;
20

Callers 1

fetch_hackmd.tsFile · 0.70

Calls 4

scanFilesFunction · 0.90
readLinesFunction · 0.90
writeFileLinesFunction · 0.90
readFetchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…