Skip to content

Commit

Permalink
feat(opencollective prompt): add option to disable it + doc
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed May 3, 2019
1 parent d16404a commit d4643ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
16 changes: 12 additions & 4 deletions README.md
Expand Up @@ -23,12 +23,14 @@
[![GitHub contributors](https://img.shields.io/github/contributors/webpack/webpack-cli.svg)](https://github.com/webpack/webpack-cli/graphs/contributors)

- [About](#about)
- [How to install](#how-to-install)
- [Getting Started](#getting-started)
- [How to install](#how-to-install)
- [Packages](#packages)
- [Commands](#commands)
- [Utilities](#utilities)
- [Getting started](#getting-started)
- [webpack CLI Scaffolds](#webpack-cli-scaffolds)
- [Commands](#commands)
- [webpack.config.js](https://webpack.js.org/concepts/configuration/)
- [Contributing and Internal Documentation](#contributing-and-internal-documentation)
- [Open Collective](#open-collective)

## About

Expand Down Expand Up @@ -89,3 +91,9 @@ The webpack family welcomes any contributor, small or big. We are happy to elabo

[deps]: https://img.shields.io/david/webpack/webpack.svg
[deps-url]: https://david-dm.org/webpack/webpack-cli

## Open Collective

If you like **webpack** Please consider donating to our [Open Collective](https://opencollective.com/webpack) to help us maintain it.

We show this message in the terminal once in a while, if you want you can disable it by setting the environment variable `DISABLE_OPENCOLLECTIVE=true` or `CI=true`.
7 changes: 6 additions & 1 deletion bin/opencollective.js
Expand Up @@ -30,4 +30,9 @@ function printBadge() {
console.log("\n");
}

printBadge();
function isTrue(value) {
return !!value && value !== "0" && value !== "false";
}
var envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.CI);

if (!envDisable) printBadge();

0 comments on commit d4643ae

Please sign in to comment.