810c5d5aef
- Fix an issue where dist might not have the proper package.json - Fix an issue with PublicServers adding button to guild list - Fix the placement of BD in settings - Change default modal button to `primary` - Change restart prompts to have `danger` prop - Change tooltips to use `primary` rather than `black` - Remove VoiceMode - Remove DarkMode - Give a hover effect to the public servers button - Fix expanding icon in emote menu - Fix over-bolded text in setting descriptions
16 lines
662 B
JavaScript
16 lines
662 B
JavaScript
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
module.exports = function(dist) {
|
|
console.log("");
|
|
console.log("Ensuring valid package.json");
|
|
|
|
const pkgFile = path.join(dist, "package.json");
|
|
if (fs.existsSync(pkgFile)) {
|
|
const currentPkg = require(pkgFile);
|
|
if (currentPkg.name && currentPkg.main && currentPkg.main === "injector.js") return console.log(" ✅ Existing package.json is valid");
|
|
console.log(" ⚠️ Existing package.json is invalid");
|
|
}
|
|
fs.writeFileSync(pkgFile, JSON.stringify({name: "betterdiscord", main: "injector.js"}));
|
|
console.log(" ✅ Created new package.json");
|
|
}; |