Skip to content

Commit

Permalink
[core] Add backers list to the readme
Browse files Browse the repository at this point in the history
rtivital committed Dec 12, 2024
1 parent eddbea8 commit 8702d8e
Showing 4 changed files with 109 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Mantine

[![NPM](https://img.shields.io/npm/l/@mantine/core)](https://github.com/mantinedev/mantine/blob/master/LICENSE)
[![Backers](https://opencollective.com/mantinedev/backers/badge.svg)](https://opencollective.com/mantinedev)
[![GitHub contributors](https://img.shields.io/github/contributors/mantinedev/mantine)](https://github.com/mantinedev/mantine/graphs/contributors)
[![npm](https://img.shields.io/npm/v/@mantine/core)](https://www.npmjs.com/package/@mantine/core)
[![npm](https://img.shields.io/npm/dm/@mantine/hooks)](https://www.npmjs.com/package/@mantine/hooks)
@@ -47,6 +48,16 @@ Mantine has a very friendly community, we are always happy to help you get start

[Become a contributor](https://mantine.dev/contribute)

## Support development

[![Backers](https://opencollective.com/mantinedev/backers/badge.svg)](https://opencollective.com/mantinedev)

Mantine is a MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome [backers](https://opencollective.com/mantinedev). If you'd like to join them, please consider contributing financially on [OpenCollective](https://opencollective.com/mantinedev).

<!-- START BACKERS -->
![.zh](https://images.opencollective.com/zh1/2cdb4c5/avatar.png) ![Incognito](https://images.opencollective.com/user-dc07d6dc/avatar.png) ![Guest](https://images.opencollective.com/guest-569fca52/avatar.png) ![Joey](https://images.opencollective.com/joey9/avatar.png) ![〘SⴷLVΞHN〙](https://images.opencollective.com/s-lvkshn/0554fd5/avatar.png) ![Enyel](https://images.opencollective.com/guest-d45c6fd8/avatar.png) ![Bruno lazer](https://images.opencollective.com/bruno-lazer/80e6da3/avatar.png) ![Threshold Health](https://images.opencollective.com/threshold-health/c6686f7/logo.png) ![Alex](https://images.opencollective.com/cyanflare/avatar.png) ![Z. Aru](https://images.opencollective.com/z-aru/1046fa1/avatar.png) ![Niaz Faridani-Rad](https://images.opencollective.com/niaz-faridani-rad/avatar.png) ![Guest](https://images.opencollective.com/guest-b2362a08/avatar.png) ![Kapta Fu](https://images.opencollective.com/kapta-fu/9f1aad5/avatar.png) ![Ahmed](https://images.opencollective.com/guest-080968a0/avatar.png) ![Incognito](https://images.opencollective.com/incognito-f26af08a/avatar.png) ![Björn](https://images.opencollective.com/guest-19e7de99/avatar.png) ![StringKe](https://images.opencollective.com/stringke/701763a/avatar.png) ![Guest](https://images.opencollective.com/guest-de4628dc/avatar.png) ![Jakob](https://images.opencollective.com/guest-0b5f8f11/avatar.png) ![tylim](https://images.opencollective.com/tylim/419936b/avatar.png)
<!-- END BACKERS -->

## License

MIT
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -62,7 +62,8 @@
"prettier:write": "prettier --write \"**/*.{ts,tsx,css}\"",
"ncu:docs": "npx npm-check-updates --packageFile './apps/*/package.json' -x @tabler/icons-react",
"ncu:root": "npx npm-check-updates --packageFile './package.json' -x @tabler/icons-react",
"ncu": "npm run ncu:docs && npm run ncu:root"
"ncu": "npm run ncu:docs && npm run ncu:root",
"backers": "tsx scripts/backers/generate-backers"
},
"dependencies": {
"@emotion/cache": "^11.13.1",
@@ -167,6 +168,7 @@
"mantine-docgen-script": "^1.3.1",
"new-github-release-url": "^2.0.0",
"next": "14.2.12",
"node-fetch": "^3.3.2",
"open": "^10.1.0",
"postcss": "^8.4.49",
"postcss-loader": "^8.1.1",
43 changes: 43 additions & 0 deletions scripts/backers/generate-backers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import fs from 'fs';
import fetch from 'node-fetch';
import { getPath } from '../utils/get-path';

const SLUG = 'mantinedev';
const OUTPUT_FILE = getPath('README.md');

async function updateBackers() {
const query = `
query {
collective(slug: "${SLUG}") {
members(role: BACKER) {
nodes {
account {
name
imageUrl
website
}
}
}
}
}
`;
const response = await fetch('https://api.opencollective.com/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query }),
});
const data: any = await response.json();

const backers = data.data.collective.members.nodes
.map((backer: any) => `![${backer.account.name}](${backer.account.imageUrl})`)
.join(' ');

let readme = fs.readFileSync(OUTPUT_FILE, 'utf8');
readme = readme.replace(
/<!-- START BACKERS -->[\s\S]*<!-- END BACKERS -->/,
`<!-- START BACKERS -->\n${backers}\n<!-- END BACKERS -->`
);
fs.writeFileSync(OUTPUT_FILE, readme);
}

updateBackers();
52 changes: 52 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -9800,6 +9800,13 @@ __metadata:
languageName: node
linkType: hard

"data-uri-to-buffer@npm:^4.0.0":
version: 4.0.1
resolution: "data-uri-to-buffer@npm:4.0.1"
checksum: 10c0/20a6b93107597530d71d4cb285acee17f66bcdfc03fd81040921a81252f19db27588d87fc8fc69e1950c55cfb0bf8ae40d0e5e21d907230813eb5d5a7f9eb45b
languageName: node
linkType: hard

"data-urls@npm:^3.0.2":
version: 3.0.2
resolution: "data-urls@npm:3.0.2"
@@ -11855,6 +11862,16 @@ __metadata:
languageName: node
linkType: hard

"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4":
version: 3.2.0
resolution: "fetch-blob@npm:3.2.0"
dependencies:
node-domexception: "npm:^1.0.0"
web-streams-polyfill: "npm:^3.0.3"
checksum: 10c0/60054bf47bfa10fb0ba6cb7742acec2f37c1f56344f79a70bb8b1c48d77675927c720ff3191fa546410a0442c998d27ab05e9144c32d530d8a52fbe68f843b69
languageName: node
linkType: hard

"figures@npm:^2.0.0":
version: 2.0.0
resolution: "figures@npm:2.0.0"
@@ -12126,6 +12143,15 @@ __metadata:
languageName: node
linkType: hard

"formdata-polyfill@npm:^4.0.10":
version: 4.0.10
resolution: "formdata-polyfill@npm:4.0.10"
dependencies:
fetch-blob: "npm:^3.1.2"
checksum: 10c0/5392ec484f9ce0d5e0d52fb5a78e7486637d516179b0eb84d81389d7eccf9ca2f663079da56f761355c0a65792810e3b345dc24db9a8bbbcf24ef3c8c88570c6
languageName: node
linkType: hard

"fragment-cache@npm:^0.2.1":
version: 0.2.1
resolution: "fragment-cache@npm:0.2.1"
@@ -15665,6 +15691,7 @@ __metadata:
mantine-docgen-script: "npm:^1.3.1"
new-github-release-url: "npm:^2.0.0"
next: "npm:14.2.12"
node-fetch: "npm:^3.3.2"
open: "npm:^10.1.0"
postcss: "npm:^8.4.49"
postcss-loader: "npm:^8.1.1"
@@ -16863,6 +16890,24 @@ __metadata:
languageName: node
linkType: hard

"node-domexception@npm:^1.0.0":
version: 1.0.0
resolution: "node-domexception@npm:1.0.0"
checksum: 10c0/5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b
languageName: node
linkType: hard

"node-fetch@npm:^3.3.2":
version: 3.3.2
resolution: "node-fetch@npm:3.3.2"
dependencies:
data-uri-to-buffer: "npm:^4.0.0"
fetch-blob: "npm:^3.1.4"
formdata-polyfill: "npm:^4.0.10"
checksum: 10c0/f3d5e56190562221398c9f5750198b34cf6113aa304e34ee97c94fd300ec578b25b2c2906edba922050fce983338fde0d5d34fcb0fc3336ade5bd0e429ad7538
languageName: node
linkType: hard

"node-forge@npm:^1":
version: 1.3.1
resolution: "node-forge@npm:1.3.1"
@@ -22961,6 +23006,13 @@ __metadata:
languageName: node
linkType: hard

"web-streams-polyfill@npm:^3.0.3":
version: 3.3.3
resolution: "web-streams-polyfill@npm:3.3.3"
checksum: 10c0/64e855c47f6c8330b5436147db1c75cb7e7474d924166800e8e2aab5eb6c76aac4981a84261dd2982b3e754490900b99791c80ae1407a9fa0dcff74f82ea3a7f
languageName: node
linkType: hard

"webidl-conversions@npm:^7.0.0":
version: 7.0.0
resolution: "webidl-conversions@npm:7.0.0"

0 comments on commit 8702d8e

Please sign in to comment.