Fully Configurable Buy Me A Coffee button in svelte
There are SVG images in the BMAC creator kit, so I used those to create a SVG image of the button and used the svg transform="scale()"
for scaling.
A Svelte SVG component for a buymeacoffee.com button.
As soon as I get a demo page up and running, I will add a screenshot.
This project uses pnpm as package manager, but any node package manager will do.
npm install --global pnpm
pnpm add sveltemeacoffee
yarn add sveltemeacoffee
npm install sveltemeacoffee
To run tests, run the following command
yarn test test
Clone the project
git clone https://github.com/skamansam/sveltemeacoffee.git
Go to the project directory
cd my-project
Install dependencies
yarn install
Start the server
yarn start
To deploy this project run
yarn deploy
Use this space to tell a little more about your project and how it can be used. Show additional screenshots, code samples, demos or link to other resources.
<script>
import BuyMeACoffee from 'sveltemeacoffee';
</script>
<BuyMeACoffee/>
Contributions are always welcome!
See contributing.md
for ways to get started.
Please read the Code of Conduct
Can you implement feature X,Y, or Z?
Why does this exist?
When trying to use the Buy Me A Coffee button, I noticed there are a few things wrong with the buttons you can create:
There are only a handful of colored images to choose from.
If you try to use a custom color or text, you can't get an image link for that custom value.
If you try to use the script code they give you, it fails in Svelte/Kit (and maybe Nuxt, etc, as well) with the following error:
Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
Distributed under the Unlicense. See LICENSE.txt for more information.
Your Name - @skamansam - skamansam@gmail.com
Project Link: https://github.com/skamansam/sveltemeacoffee
I would like to say, "Thank You" to all the amazing developers who have chosen to share their talents with the world! A special shout-out goes to the following: