Skip to content

Commit

Permalink
Merge pull request #863 from misterdev/feat/option-to-disable-postins…
Browse files Browse the repository at this point in the history
…tall

feat(opencollective prompt): add disable option
  • Loading branch information
evenstensberg committed May 4, 2019
2 parents c833961 + b4dfa17 commit 0309e37
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][contributors]][contributors-url]

- [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 @@ -87,6 +89,12 @@ You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding)

The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](./.github/CONTRIBUTING.md).

## 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 a week, if you want you can disable it by setting the environment variable `DISABLE_OPENCOLLECTIVE=true` or `CI=true`.

[build-status]: https://travis-ci.org/webpack/webpack-cli.svg
[build-status-url]: https://travis-ci.org/webpack/webpack-cli
[build-status-azure]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli
Expand Down
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";
}
const envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.CI);

if (!envDisable) printBadge();

0 comments on commit 0309e37

Please sign in to comment.