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

Function bundleEachPlatform

tasks/bundle-js.js:199–208  ·  view source on GitHub ↗
({platforms, debug, watch, log, test}, entries)

Source from the content-addressed store, hash-verified

197
198 /** @type {(options: Partial<TaskOptions> & {platforms: TaskOptions['platforms']}, entries?: JSEntry[]) => Promise<void>} */
199 const bundleEachPlatform = async ({platforms, debug, watch, log, test}, entries) => {
200 const allPlatforms = Object.values(PLATFORM).filter((platform) => platform !== PLATFORM.API);
201 for (const entry of (entries || jsEntries)) {
202 const possiblePlatforms = entry.platform ? [entry.platform] : allPlatforms;
203 const targetPlatforms = possiblePlatforms.filter((platform) => platforms[platform]);
204 for (const platform of targetPlatforms) {
205 await bundleJS(entry, platform, debug, watch, log, test);
206 }
207 }
208 };
209
210 /** @type {(changedFiles: string[], watcher: FSWatcher, platforms: any) => Promise<void>} */
211 const onChange = async (changedFiles, watcher, initialPlatforms) => {

Callers 1

onChangeFunction · 0.85

Calls 1

bundleJSFunction · 0.85

Tested by

no test coverage detected