@nuxt/opencollective 🤝 Pretty opencollective stats on postinstall!
Displaying opencollective statistics and a donation URL after users install a package is important for many creators. After problems with current packages that offer similar features, we decided to spin off our one own. Our key goals are:
- No interference/problems when installing packages. Never break installation because of the package
- Pretty output for all information
- Decent configurability
- Seamless drop-in for common solutions
@nuxt/opencollectivedependency using yarn or npm to your project
- Add the script to
postinstallin your package.json
// ..."scripts":"postinstall": "opencollective || exit 0""collective":"url": ""// ...
- Configure it
Configuration is applied through your project's
A full configuration looks like:
|url||❌||-||The URL to your opencollective page|
|logo||✅||-||LEGACY: The URL to the logo that should be displayed. Please use
|logoUrl||✅||-||The URL to the ASCII-logo that should be displayed.|
|donation.slug||✅||'/donate'||The slug that should be appended to
|donation.amount||✅||-||The default amount that should be selected on the opencollective page.|
|donation.text||✅||'Donate:'||The text that will be displayed before your donation url.|
We know the postinstall messages can be annoying when deploying in production or running a CI pipeline. That's why the message is disabled in those environments by default.
Enabled when one the following environment variables is set:
Strictly Disabled when one the following environment variables is set:
NODE_ENV(set and not
DISABLE_OPENCOLLECTIVE(set to any string value that is not
'0', for compatability with opencollective-postinatall)
- Clone this repository
- Install dependencies using
- Run it manually
- Run tests with
This project is heavily inspired by opencollective-cli.
MIT License MIT. Made with 💖