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

Function processExtensionPlatform

tasks/code-style.js:39–52  ·  view source on GitHub ↗
(platform)

Source from the content-addressed store, hash-verified

37}
38
39async function processExtensionPlatform(platform) {
40 const dir = getDestDir({debug: false, platform});
41 const files = await getPaths(extensions.map((ext) => `${dir}/**/*.${ext}`));
42 for (const file of files) {
43 const code = await readFile(file);
44 const formatted = await format(code, {
45 ...options,
46 filepath: file,
47 });
48 if (code !== formatted) {
49 await writeFile(file, formatted);
50 }
51 }
52}
53
54async function codeStyle({platforms, debug}) {
55 if (debug) {

Callers 1

codeStyleFunction · 0.85

Calls 4

getDestDirFunction · 0.90
getPathsFunction · 0.90
readFileFunction · 0.90
writeFileFunction · 0.90

Tested by

no test coverage detected