Przeglądaj źródła

chore: sponsorkit (#753)

* chore: added sponsors to readme + ci

* chore: ignore folder for linting
Alvaro Saburido 1 rok temu
rodzic
commit
e630114b35

+ 37 - 0
.github/workflows/sponsorkit.yml

@@ -0,0 +1,37 @@
+name: Scheduler
+
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '0 0 * * *'
+  push:
+    branches: [ master ]
+
+jobs:
+  update-sponsors:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+
+      - uses: pnpm/action-setup@v3
+
+      - name: Set node
+        uses: actions/setup-node@v4
+        with:
+          node-version: lts/*
+
+      - run: corepack enable && pnpm i
+
+      - name: Update sponsors
+        run: npm run build
+        env:
+          SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORKIT_GITHUB_TOKEN }}
+          SPONSORKIT_GITHUB_LOGIN: alvarosabu
+
+      - name: Commit
+        uses: EndBug/add-and-commit@v5
+        with:
+          message: "chore: update sponsors.svg"
+          add: "sponsors.*"
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 3 - 0
.gitignore

@@ -25,3 +25,6 @@ coverage
 *.sw?
 docs/.vitepress/dist/
 docs/.vitepress/cache/
+
+.env
+.env.local

+ 5 - 1
README.md

@@ -92,4 +92,8 @@ pnpm run docs:build
 
 ## Sponsors
 
-Be the first to support this project [here](https://github.com/sponsors/alvarosabu) ☺️
+<p align="center">
+  <a target="_blank" href="https://github.com/sponsors/tresjs">
+    <img alt="sponsors" src="./sponsorkit/sponsors.svg">
+  </a>
+</p>

+ 1 - 1
eslint.config.js

@@ -1,7 +1,7 @@
 import { tresLintConfig } from '@tresjs/eslint-config'
 
 export default tresLintConfig({
-  ignores: ['dist', 'node_modules', 'public', '.github', 'docs/blog'],
+  ignores: ['dist', 'node_modules', 'public', '.github', 'docs/blog', 'sponsorkit'],
 }, {
   rules: {
     'style/max-statements-per-line': 'off',

+ 1 - 0
package.json

@@ -97,6 +97,7 @@
     "rollup-plugin-analyzer": "^4.0.0",
     "rollup-plugin-copy": "^3.5.0",
     "rollup-plugin-visualizer": "^5.12.0",
+    "sponsorkit": "^0.14.6",
     "three": "^0.165.0",
     "unocss": "^0.60.4",
     "unplugin": "^1.10.1",

Plik diff jest za duży
+ 573 - 0
pnpm-lock.yaml


+ 41 - 0
sponsorkit.config.ts

@@ -0,0 +1,41 @@
+import { defineConfig, tierPresets } from 'sponsorkit'
+
+export default defineConfig({
+  // Providers configs
+  github: {
+    login: 'tresjs',
+    type: 'organization',
+  },
+  // Rendering configs
+  width: 800,
+  renderer: 'tiers', // or 'circles'
+  formats: ['json', 'svg', 'png'],
+  tiers: [
+    // Past sponsors, currently only supports GitHub
+    {
+      title: 'Past Sponsors',
+      monthlyDollars: -1,
+      preset: tierPresets.xs,
+    },
+    // Default tier
+    {
+      title: 'Backers',
+      preset: tierPresets.base,
+    },
+    {
+      title: 'Sponsors',
+      monthlyDollars: 10,
+      preset: tierPresets.medium,
+    },
+    {
+      title: 'Generous Backers',
+      monthlyDollars: 50,
+      preset: tierPresets.large,
+    },
+    {
+      title: 'Gold Sponsors',
+      monthlyDollars: 100,
+      preset: tierPresets.xl,
+    },
+  ],
+})

Plik diff jest za duży
+ 8 - 0
sponsorkit/.cache.json


Plik diff jest za duży
+ 9 - 0
sponsorkit/sponsors.json


BIN
sponsorkit/sponsors.png


Plik diff jest za duży
+ 19 - 0
sponsorkit/sponsors.svg


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików