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

Function copyDir

scripts/util.ts:317–334  ·  view source on GitHub ↗
(config: BuildConfig, srcDir: string, destDir: string)

Source from the content-addressed store, hash-verified

315}
316
317export async function copyDir(config: BuildConfig, srcDir: string, destDir: string) {
318 await mkdir(destDir);
319 const items = await readdir(srcDir);
320 await Promise.all(
321 items.map(async (itemName) => {
322 if (!IGNORE[itemName] && !itemName.includes('.test')) {
323 const srcPath = join(srcDir, itemName);
324 const destPath = join(destDir, itemName);
325 const itemStat = await stat(srcPath);
326 if (itemStat.isDirectory()) {
327 await copyDir(config, srcPath, destPath);
328 } else if (itemStat.isFile()) {
329 await copyFile(srcPath, destPath);
330 }
331 }
332 })
333 );
334}
335
336const IGNORE: { [path: string]: boolean } = {
337 '.rollup.cache': true,

Callers 5

buildQwikAuthFunction · 0.90
buildQwikWorkerFunction · 0.90
buildSupabaseAuthHelpersFunction · 0.90
submoduleCliFunction · 0.90
buildQwikReactFunction · 0.90

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…