MCPcopy Index your code
hub / github.com/darkreader/darkreader / copyAll

Function copyAll

tasks/copy.js:59–76  ·  view source on GitHub ↗
({platforms, debug})

Source from the content-addressed store, hash-verified

57 };
58
59 const copyAll = async ({platforms, debug}) => {
60 const promises = [];
61 const enabledPlatforms = Object.values(PLATFORM).filter((platform) => platform !== PLATFORM.API && platforms[platform]);
62 for (const entry of copyEntries) {
63 if (entry.platforms && !entry.platforms.some((platform) => platforms[platform])) {
64 continue;
65 }
66 const files = await getPaths(`${srcDir}/${entry.path}`);
67 for (const file of files) {
68 for (const platform of enabledPlatforms) {
69 if (entry.platforms === undefined || entry.platforms.includes(platform)) {
70 promises.push(copyEntry(file, {debug, platform}));
71 }
72 }
73 }
74 }
75 await Promise.all(promises);
76 };
77
78 /** @type {(changedFiles: string[], watcher: FSWatcher, platforms: any) => Promise<void>} */
79 const onChange = async (changedFiles, _, platforms) => {

Callers

nothing calls this directly

Calls 3

getPathsFunction · 0.90
copyEntryFunction · 0.85
allMethod · 0.80

Tested by

no test coverage detected