Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

sponsorkit

Package Overview
Dependencies
9
Maintainers
1
Versions
19
Issues
File Explorer

Advanced tools

sponsorkit

Toolkit for generating sponsors images

    0.4.1latest

Version published
Maintainers
1
Yearly downloads
2,159

Weekly downloads

Changelog

Source

v0.4.1

Readme

Source

SponsorKit

NPM version

Toolkit for generating sponsors images.

Usage

Create .env file with:

; GitHub provider. ; Token requires the `read:user` and `read:org` scopes. SPONSORKIT_GITHUB_TOKEN=your_github_token SPONSORKIT_GITHUB_LOGIN=your_github_username ; Patreon provider. ; Create v2 API key at https://www.patreon.com/portal/registration/register-clients ; and use the "Creator’s Access Token". SPONSORKIT_PATREON_TOKEN=your_patreon_token

Only one provider is required to be configured.

Run:

npx sponsorkit

Example Setup | GitHub Actions Setup | Generated SVG

Configurations

Create sponsorkit.config.js file with:

import { defineConfig, presets } from 'sponsorkit' export default defineConfig({ // Providers configs github: { login: 'antfu', }, // Rendering configs width: 800, formats: ['json', 'svg', 'png'], tiers: [ { title: 'Backers', preset: presets.base, }, { title: 'Sponsors', monthlyDollars: 10, preset: presets.medium, }, { title: 'Silver Sponsors', monthlyDollars: 50, preset: presets.large, }, { title: 'Gold Sponsors', monthlyDollars: 100, preset: presets.xl, }, ], })

Also check the example.

Utils

You can also use SponsorKit programmatically:

import { fetchSponsors } from 'sponsorkit' const sponsors = await fetchSponsors(token, login)

Check the type definition or source code for more utils available.

Sponsors

License

MIT License © 2022 Anthony Fu

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc