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

Function onChange

tasks/copy.js:79–88  ·  view source on GitHub ↗
(changedFiles, _, platforms)

Source from the content-addressed store, hash-verified

77
78 /** @type {(changedFiles: string[], watcher: FSWatcher, platforms: any) => Promise<void>} */
79 const onChange = async (changedFiles, _, platforms) => {
80 for (const file of changedFiles) {
81 if (await pathExists(file)) {
82 for (const platform of Object.values(PLATFORM).filter((platform) => platforms[platform])) {
83 await copyEntry(file, {debug: true, platform});
84 }
85 }
86 }
87 reload.reload({type: reload.FULL});
88 };
89
90 return createTask(
91 'copy',

Callers

nothing calls this directly

Calls 2

pathExistsFunction · 0.90
copyEntryFunction · 0.85

Tested by

no test coverage detected