mirror of
https://github.com/PaiGramTeam/PaiGramDocs.git
synced 2024-11-22 15:36:46 +00:00
32 lines
701 B
TypeScript
32 lines
701 B
TypeScript
|
import contributors from './contributors.json'
|
||
|
|
||
|
export interface Contributor {
|
||
|
name: string
|
||
|
avatar: string
|
||
|
}
|
||
|
|
||
|
export interface CoreTeam {
|
||
|
avatar: string
|
||
|
name: string
|
||
|
github: string
|
||
|
twitter?: string
|
||
|
sponsors?: boolean
|
||
|
description: string
|
||
|
packages?: string[]
|
||
|
functions?: string[]
|
||
|
}
|
||
|
|
||
|
const contributorsAvatars: Record<string, string> = {}
|
||
|
|
||
|
function getAvatarUrl(name: string) {
|
||
|
return `https://github.com/${name}.png`
|
||
|
}
|
||
|
|
||
|
const contributorList = (contributors as string[]).reduce((acc, name) => {
|
||
|
contributorsAvatars[name] = getAvatarUrl(name)
|
||
|
acc.push({ name, avatar: contributorsAvatars[name] })
|
||
|
return acc
|
||
|
}, [] as Contributor[])
|
||
|
|
||
|
export { contributorList as contributors }
|