0.1.7 • Published 4 years ago

@lsos/donation-reminder v0.1.7

Weekly downloads
43
License
-
Repository
github
Last release
4 years ago

Lsos Donation Reminder

Show a donation-reminder in the browser developer console, to kindly remind (large) companies to donate.

Live Demo: lsos.org/reminder/demo. The donation-reminder is removable.

Getting Started Questions & Discussions FAQ

Getting Started

import { printDonationReminder } from "@lsos/donation-reminder"; // npm i @lsos/donation-reminder

// Show a donation-reminder in the browser developer console
printDonationReminder({
  // Npm package name
  npmName: "my-open-source-project",

  // Human-readable project name
  projectName: "My Open Source Project",

  // Shown text
  donationText: "Hi :smile:, I'm Alice, I'm looking for a gold sponsor, thanks! :heart:",

  // Show the donation-reminder only to developers working on projects with >=5 authors
  minNumberOfAuthors: 5,
});

When setting the option minNumberOfAuthors to n, the donation-reminder is only shown to developers working in a Git repository that has n or more Git authors. You can use this setting in order to show the donation-reminder only to large companies. (You may want money from companies, not hobbyists.)

You can use any emoji of the Twemoji catalog. (These are the emojis you see on Twitter and Discord.) You can use Discord to find emoji codes such as :smile: or :heart:.

Users can remove the donation-reminder by running npx lsos remove/yarn lsos remove.

Questions & Discussions

For any questions about the donation-reminder open a ticket here, and for broad discussions about open source financing open a ticket on github.com/Lsos/converse.

FAQ

End-user How can I remove the donation-reminder?

Run npx lsos remove / yarn lsos remove in your project directory.

End-user How do I make sure the donation-reminder is not shown in tests, staging and production?

The donation-reminder is not shown if:

  • window.location.hostname !== 'localhost', or if
  • window.process.env.NODE_ENV && !['dev', 'development'].includes(window.process.env.NODE_ENV).

For example, if window.location.hostname === 'https://example.com' or if ['production', 'staging', 'test'].includes(window.process.env.NODE_ENV) then the donation-reminder is not shown.

OSS-project I don't see any donation-reminder, where is it?

The donation-reminder is currently only shown on Chromium-based browsers. If you use Firefox, you won't see any donation-reminder.

Also note that the minNumberOfAuthors parameter may hide the donation-reminder from you.

OSS-project Does it work only for browser libraries?

Yes, the donation-reminder is only meant to be shown in the browser developer console.

OSS-project Can I show the donation-reminder to all my users?

Yes, just set minNumberOfAuthors: 0.

Note that significant donations mostly come from companies. It usually isn't worth it to show a donation-reminder to a user working on a single-author hobby project you may want money from companies, not hobbyists.

How does it work?

If you're curious about what the code does in detail, check out the source code explainer at /src/.

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago