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

Function bundleHTML

tasks/bundle-html.js:100–114  ·  view source on GitHub ↗
({platforms, debug})

Source from the content-addressed store, hash-verified

98 */
99export function createBundleHTMLTask(htmlEntries) {
100 const bundleHTML = async ({platforms, debug}) => {
101 const promises = [];
102 const enabledPlatforms = Object.values(PLATFORM).filter((platform) => platform !== PLATFORM.API && platforms[platform]);
103 for (const entry of htmlEntries) {
104 if (entry.platforms && !entry.platforms.some((platform) => platforms[platform])) {
105 continue;
106 }
107 for (const platform of enabledPlatforms) {
108 if (entry.platforms === undefined || entry.platforms.includes(platform)) {
109 promises.push(writeEntry(entry, {debug, platform}));
110 }
111 }
112 }
113 await Promise.all(promises);
114 };
115
116 return createTask(
117 'bundle-html',

Callers

nothing calls this directly

Calls 2

writeEntryFunction · 0.85
allMethod · 0.80

Tested by

no test coverage detected