MCPcopy Create free account
hub / github.com/elastic/eui / copyFilesToDestinationDirs

Function copyFilesToDestinationDirs

packages/eui/scripts/compile-eui.js:43–61  ·  view source on GitHub ↗
(files, destinationDirs)

Source from the content-addressed store, hash-verified

41}
42
43async function copyFilesToDestinationDirs(files, destinationDirs) {
44 let count = 0;
45 for await (const filePath of files) {
46 const fullPath = path.join(srcDir, filePath);
47
48 for (const destinationDir of destinationDirs) {
49 const destPath = path.join(destinationDir, filePath);
50 const destDir = path.dirname(destPath);
51
52 // Attempt to create a directory if it doesn't exist yet
53 await fs.mkdir(destDir, { recursive: true });
54
55 await fs.copyFile(fullPath, destPath);
56 }
57 count++;
58 }
59
60 return count;
61}
62
63async function copyJsonFiles() {
64 const files = glob.globIterate('**/*.json', {

Callers 2

copyJsonFilesFunction · 0.85
copySvgFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…