opencollective-postinstall

1.0.1 • Public • Published

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 [--no-logo]" // if you pass --no-logo, we won't show the Open Collective logo
  },
  ...
}

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

Package Sidebar

Install

npm i opencollective-postinstall@1.0.1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • asood123
  • xdamman