opencollective-postinstall
Prompt your users to donate to your collective after npm install
Install
npm install opencollective-postinstall --save
In your package.json
, add:
{
...
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/yourcollective_slug" // e.g. https://opencollective.com/webpack
},
"scripts": {
"postinstall": "./bin/opencollective-postinstall"
},
...
}
Suggest a donation amount (optional)
In the "collective" section of your package.json
, add:
{
...
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/yourcollective_slug", // e.g. https://opencollective.com/webpack
"suggested_donation": {
"amount": 2,
"currency": "USD", // must be same currency than your collective's default currency
"interval": "monthly" // or "one-time" or "yearly"
}
}
}
Questions? Comments? Feedback?
Join the #opensource channel on our slack: https://slack.opencollective.org