Skip to content

Commit

Permalink
更新 index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnAngela authored Jan 21, 2024
1 parent 5b7958b commit 6f5b6e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/generatePolyfill/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ if (newUnrecognizableFeatures.length === 0 && !hasUnparsableUnrecognizableFeatur
}
console.info("Start to write polyfill file to gadget-libPolyfill ...");
const flaggableFeatures = features.filter((feature) => !newUnrecognizableFeatures.includes(feature));
const code = `${await fs.promises.readFile("scripts/generatePolyfill/template.js")}`.replace("$$$TARGET_CHROMIUM_VERSION$$$", TARGET_CHROMIUM_VERSION).replace("$$$TARGET_UA$$$", TARGET_UA).replace("$$$FLAGGABLE_FEATURES$$$", JSON.stringify(flaggableFeatures, null, 1).replace(/\n */g, " ")).replace("$$$FEATURES$$$", encodeURIComponent(flaggableFeatures.join(",")));
const code = `${await fs.promises.readFile("scripts/generatePolyfill/template.js")}`.replace("$$$TARGET_CHROMIUM_VERSION$$$", TARGET_CHROMIUM_VERSION).replace("$$$TARGET_UA$$$", TARGET_UA).replace("$$$FLAGGABLE_FEATURES$$$", JSON.stringify(flaggableFeatures, null, 1).replace(/\n */g, " ")).replace("$$$FEATURES$$$", flaggableFeatures.join(","));
await fs.promises.writeFile("src/gadgets/libPolyfill/MediaWiki:Gadget-libPolyfill.js", code);
console.info("\tDone.");
console.info("Start to generate .eslintrc.yaml ...");
Expand Down

0 comments on commit 6f5b6e6

Please sign in to comment.