Skip to content

Commit ee227ef

Browse files
authored
chore: Remove unnecessary IIFE in update-readme (#637)
1 parent c174944 commit ee227ef

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

tools/update-readme.js

+13-15
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,21 @@ async function fetchSponsorsMarkdown() {
4040
// Main
4141
//-----------------------------------------------------------------------------
4242

43-
(async () => {
44-
const allSponsors = await fetchSponsorsMarkdown();
43+
const allSponsors = await fetchSponsorsMarkdown();
4544

46-
README_FILE_PATHS.forEach(filePath => {
45+
README_FILE_PATHS.forEach(filePath => {
4746

48-
// read readme file
49-
const readme = readFileSync(filePath, "utf8");
47+
// read readme file
48+
const readme = readFileSync(filePath, "utf8");
5049

51-
let newReadme = readme.replace(
52-
/<!--sponsorsstart-->[\w\W]*?<!--sponsorsend-->/u,
53-
`<!--sponsorsstart-->\n${allSponsors}\n<!--sponsorsend-->`
54-
);
50+
let newReadme = readme.replace(
51+
/<!--sponsorsstart-->[\w\W]*?<!--sponsorsend-->/u,
52+
`<!--sponsorsstart-->\n${allSponsors}\n<!--sponsorsend-->`
53+
);
5554

56-
// replace multiple consecutive blank lines with just one blank line
57-
newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n");
55+
// replace multiple consecutive blank lines with just one blank line
56+
newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n");
5857

59-
// output to the files
60-
writeFileSync(filePath, newReadme, "utf8");
61-
});
62-
})();
58+
// output to the files
59+
writeFileSync(filePath, newReadme, "utf8");
60+
});

0 commit comments

Comments
 (0)