Skip to content

Commit d4643ae

Browse files
committedMay 3, 2019
feat(opencollective prompt): add option to disable it + doc
1 parent d16404a commit d4643ae

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed
 

‎README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
[![GitHub contributors](https://img.shields.io/github/contributors/webpack/webpack-cli.svg)](https://github.com/webpack/webpack-cli/graphs/contributors)
2424

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

3335
## About
3436

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

9092
[deps]: https://img.shields.io/david/webpack/webpack.svg
9193
[deps-url]: https://david-dm.org/webpack/webpack-cli
94+
95+
## Open Collective
96+
97+
If you like **webpack** Please consider donating to our [Open Collective](https://opencollective.com/webpack) to help us maintain it.
98+
99+
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`.

‎bin/opencollective.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ function printBadge() {
3030
console.log("\n");
3131
}
3232

33-
printBadge();
33+
function isTrue(value) {
34+
return !!value && value !== "0" && value !== "false";
35+
}
36+
var envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.CI);
37+
38+
if (!envDisable) printBadge();

0 commit comments

Comments
 (0)
Please sign in to comment.