-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
sponsorkit.config.js
107 lines (103 loc) · 2.56 KB
/
sponsorkit.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { defineConfig, tierPresets } from 'sponsorkit'
export default defineConfig({
// Providers configs
github: {
login: 'codedredd',
type: 'user',
},
// Rendering configs
width: 800,
includePastSponsors: true,
outputDir: './docs/public/sponsorkit',
includePrivate: true,
onSponsorsFetched: (sponsors) => {
sponsors = sponsors.map(sponsor => {
if (sponsor.isOneTime) {
sponsor.monthlyDollars = 0
}
return sponsor
})
console.log(sponsors)
sponsors.push({
sponsor: {
__typename: undefined,
login: 'swash',
name: 'getriebesand',
avatarUrl: 'https://avatars.githubusercontent.com/u/5921286?v=4',
type: 'User'
},
isOneTime: true,
monthlyDollars: 0,
privacyLevel: 'PUBLIC',
tierName: undefined,
createdAt: 'Fri, 03 Mar 1999 23:00:00 GMT',
provider: 'github'
},
{
sponsor: {
__typename: undefined,
login: 'jhercog',
name: 'jhercog',
avatarUrl: 'https://avatars.githubusercontent.com/u/181355?v=4',
type: 'User'
},
isOneTime: true,
monthlyDollars: 0,
privacyLevel: 'PUBLIC',
tierName: undefined,
createdAt: 'Fri, 03 Mar 2023 23:00:00 GMT',
provider: 'github'
},
{
sponsor: {
__typename: undefined,
login: 'svenhue',
name: 'Sven Hue',
avatarUrl: 'https://avatars.githubusercontent.com/u/83905274?v=4',
type: 'User'
},
isOneTime: true,
monthlyDollars: 0,
privacyLevel: 'PUBLIC',
tierName: undefined,
createdAt: 'Fri, 03 Mar 1999 23:00:00 GMT',
provider: 'github'
})
return sponsors
},
force: true,
formats: ['json', 'svg', 'png'],
tiers: [
// Past sponsors, currently only supports GitHub
{
title: 'Past Sponsors',
monthlyDollars: -1,
preset: tierPresets.xs,
// to insert custom elements after the tier block
composeAfter: (composer, _tierSponsors, _config) => {
composer.addSpan(10)
},
},
// Default tier
{
title: 'Backers',
monthlyDollars: 0,
preset: tierPresets.base,
},
{
title: 'Bronze Sponsors',
monthlyDollars: 5,
preset: tierPresets.base,
},
{
title: 'Silver Sponsors',
monthlyDollars: 16,
preset: tierPresets.medium,
},
{
title: 'Gold Sponsors',
monthlyDollars: 100,
preset: tierPresets.xl,
},
],
})