diff --git a/bin/opencollective.js b/bin/opencollective.js deleted file mode 100644 index 62a14f82482..00000000000 --- a/bin/opencollective.js +++ /dev/null @@ -1,42 +0,0 @@ -const chalk = require("chalk"); - -// Only show emoji on OSx (Windows shell doesn't like them that much ¯\_(ツ)_/¯ ) -function emoji(emoji) { - if (process.stdout.isTTY && process.platform === "darwin") { - return emoji; - } else { - return ""; - } -} - -function print(str = "", color = "dim") { - const terminalCols = 80; - // eslint-disable-next-line no-control-regex - const ansiEscapeSeq = /\u001b\[[0-9]{1,2}m/g; - const strLength = str.replace(ansiEscapeSeq, "").length; - const leftPaddingLength = Math.floor((terminalCols - strLength) / 2); - const leftPadding = " ".repeat(leftPaddingLength); - str = chalk[color](str); - console.log(leftPadding, str); -} - -function printBadge() { - console.log("\n"); - print(`${chalk.bold("Thanks for using")} ${chalk.bold.blue("webpack!")}`); - print(`Please consider donating to our ${chalk.bold.blue("Open Collective")}`); - print("to help us maintain this package."); - console.log("\n\n"); - print( - `${emoji("👉")} ${chalk.bold.yellow(" Donate:")} ${chalk.reset.underline.yellow( - "https://opencollective.com/webpack/donate" - )}` - ); - console.log("\n"); -} - -function isTrue(value) { - return !!value && value !== "0" && value !== "false"; -} -const envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.CI); - -if (!envDisable) printBadge(); diff --git a/package.json b/package.json index e6a2d7df0f2..ea60d8dbe06 100644 --- a/package.json +++ b/package.json @@ -173,9 +173,5 @@ "typescript": "3.5.2", "webpack": "4.x.x", "webpack-dev-server": "3.7.2" - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" } }