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

Function syncCodeSandbox

packages/docs/codesandbox.sync.ts:92–101  ·  view source on GitHub ↗
(mdxPath: string, srcPath: string, lines: string[])

Source from the content-addressed store, hash-verified

90}
91
92function syncCodeSandbox(mdxPath: string, srcPath: string, lines: string[]) {
93 console.log('SYNCING', mdxPath, srcPath);
94 const first = lines[0];
95 const newContent = readFile(join('.', srcPath));
96 while (newContent.length && newContent[newContent.length - 1] == '') {
97 newContent.pop();
98 }
99 const last = lines[lines.length - 1];
100 return [first, ...newContent, last];
101}
102
103scanFiles('src/routes', mdxFiles, syncCodeSandboxes);

Callers

nothing calls this directly

Calls 2

readFileFunction · 0.85
joinFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…