Skip to content

Commit

Permalink
WIP: Contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Feb 24, 2023
1 parent d688f1f commit 00a14ee
Show file tree
Hide file tree
Showing 15 changed files with 3,438 additions and 416 deletions.
9 changes: 9 additions & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
"acyclicer",
"adamiecki",
"alois",
"aloisklink",
"antiscript",
"appli",
"applitools",
"asciidoctor",
"ashish",
"ashishjain",
"astah",
"bbox",
"bilkent",
Expand Down Expand Up @@ -48,18 +50,21 @@
"greywolf",
"inkdrop",
"jaoude",
"jgreywolf",
"jison",
"kaufmann",
"khroma",
"klemm",
"klink",
"knsv",
"knut",
"knutsveidqvist",
"laganeckas",
"lintstagedrc",
"logmsg",
"lucida",
"matthieu",
"matthieumorel",
"mdast",
"mdbook",
"mermerd",
Expand All @@ -68,9 +73,11 @@
"mindmaps",
"mitigations",
"mkdocs",
"mmorel",
"mult",
"ohmyfetch",
"orlandoni",
"pbrolin",
"phpbb",
"plantuml",
"playfair",
Expand Down Expand Up @@ -100,8 +107,10 @@
"treemap",
"ts-nocheck",
"tuleap",
"tylerlong",
"ugge",
"unist",
"Unocss",
"verdana",
"viewports",
"vinod",
Expand Down
4 changes: 3 additions & 1 deletion packages/mermaid/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
src/vitepress
src/docs/config/setup
README.*
README.*
src/docs/public/user-avatars/
src/docs/.vitepress/cache
4 changes: 2 additions & 2 deletions packages/mermaid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"docs:build": "rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts",
"docs:verify": "pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify",
"docs:pre:vitepress": "rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress",
"docs:build:vitepress": "pnpm docs:pre:vitepress && vitepress build src/vitepress && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing",
"docs:dev": "pnpm docs:pre:vitepress && concurrently \"vitepress dev src/vitepress\" \"ts-node-esm src/docs.mts --watch --vitepress\"",
"docs:build:vitepress": "pnpm docs:pre:vitepress && (cd src/vitepress && pnpm --filter ./ install && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing",
"docs:dev": "pnpm docs:pre:vitepress && concurrently \"pnpm --filter ./ src/vitepress dev\" \"ts-node-esm src/docs.mts --watch --vitepress\"",
"docs:serve": "pnpm docs:build:vitepress && vitepress serve src/vitepress",
"docs:spellcheck": "cspell --config ../../cSpell.json \"src/docs/**/*.md\"",
"release": "pnpm build",
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/docs.mts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ const transformHtml = (filename: string) => {
};

const getGlobs = (globs: string[]): string[] => {
globs.push('!**/dist', '!**/redirect.spec.ts', '!**/landing');
globs.push('!**/dist', '!**/redirect.spec.ts', '!**/landing', '!**/node_modules');
if (!vitepress) {
globs.push('!**/.vitepress', '!**/vite.config.ts', '!src/docs/index.md');
}
Expand Down
13 changes: 13 additions & 0 deletions packages/mermaid/src/docs/.vitepress/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

export {}

declare module '@vue/runtime-core' {
export interface GlobalComponents {
Contributors: typeof import('./components/Contributors.vue')['default']
HomePage: typeof import('./components/HomePage.vue')['default']
}
}
26 changes: 26 additions & 0 deletions packages/mermaid/src/docs/.vitepress/components/HomePage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup lang="ts">
import { VPTeamMembers } from 'vitepress/theme';
import { teamMembers } from '../contributors';
</script>

<template>
<div class="content">
<div class="content-container">
<main class="main">
<div class="vp-doc" flex flex-col items-center mt-10>
<h2 id="meet-the-team" op50 font-normal p="t-10 b-2">Meet The Team</h2>
<div w-full p-10>
<VPTeamMembers size="small" :members="teamMembers" />
</div>
<h2 id="the-team" op50 font-normal pt-5 pb-2>Contributors</h2>
<p text-lg max-w-200 text-center leading-7>
<Contributors />
<br />
<a href="https://chat.vitest.dev" rel="noopener noreferrer">Join the community</a> and
get involved!
</p>
</div>
</main>
</div>
</div>
</template>
204 changes: 125 additions & 79 deletions packages/mermaid/src/docs/.vitepress/contributors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import contributorNames from './contributor-names.json';
import contributorNamesJson from './contributor-names.json';

export interface Contributor {
name: string;
avatar: string;
}

export interface SocialEntry {
icon: string;
icon: string | { svg: string };
link: string;
}

Expand All @@ -15,97 +15,143 @@ export interface CoreTeam {
name: string;
// required to download avatars from GitHub
github: string;
twitter: string;
twitter?: string;
mastodon?: string
sponsor?: string;
website?: string;
linkedIn?: string;
title?: string;
org?: string;
desc?: string;
links?: SocialEntry[];
}

const contributorNames: string[] = contributorNamesJson;
const contributorsAvatars: Record<string, string> = {};

const getAvatarUrl = (name: string) =>
import.meta.hot ? `https://github.com/${name}.png` : `/user-avatars/${name}.png`;

export const contributors = (contributorNames as string[]).reduce((acc, name) => {
contributorsAvatars[name] = getAvatarUrl(name);
acc.push({ name, avatar: contributorsAvatars[name] });
return acc;
}, [] as Contributor[]);
contributorsAvatars[name] = getAvatarUrl(name)
acc.push({ name, avatar: contributorsAvatars[name] })
return acc
}, [] as Contributor[])

// const createLinks = (tm: CoreTeam): CoreTeam => {
// tm.links = [
// { icon: 'github', link: `https://github.com/${tm.github}` },
// { icon: 'twitter', link: `https://twitter.com/${tm.twitter}` },
// ];
// return tm;
// };
const websiteSVG = {
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-globe"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>'
}

const createLinks = (tm: CoreTeam): CoreTeam => {
tm.links = [{ icon: 'github', link: `https://github.com/${tm.github}` }]
if (tm.mastodon) {
tm.links.push({ icon: 'mastodon', link: tm.mastodon })
}
if (tm.twitter) {
tm.links.push({ icon: 'twitter', link: `https://twitter.com/${tm.twitter}` })
}
if (tm.website) {
tm.links.push({ icon: websiteSVG, link: tm.website })
}
if (tm.linkedIn) {
tm.links.push({ icon: 'linkedin', link: `https://www.linkedin.com/in/${tm.linkedIn}` })
}
return tm
}

// const plainTeamMembers: CoreTeam[] = [
// {
// avatar: contributorsAvatars.antfu,
// name: 'Anthony Fu',
// github: 'antfu',
// twitter: 'antfu7',
// sponsor: 'https://github.com/sponsors/antfu',
// title: 'A fanatical open sourceror, working',
// org: 'NuxtLabs',
// desc: 'Core team member of Vite & Vue',
// },
// {
// avatar: contributorsAvatars['sheremet-va'],
// name: 'Vladimir',
// github: 'sheremet-va',
// twitter: 'sheremet_va',
// sponsor: 'https://github.com/sponsors/sheremet-va',
// title: 'An open source fullstack developer',
// desc: 'Core team member of Vitest',
// },
// {
// avatar: contributorsAvatars['patak-dev'],
// name: 'Patak',
// github: 'patak-dev',
// twitter: 'patak_dev',
// sponsor: 'https://github.com/sponsors/patak-dev',
// title: 'A collaborative being, working',
// org: 'StackBlitz',
// desc: 'Core team member of Vite & Vue',
// },
// {
// avatar: contributorsAvatars.Aslemammad,
// name: 'Mohammad Bagher',
// github: 'Aslemammad',
// twitter: 'asleMammadam',
// title: 'An open source developer',
// desc: 'Team member of Poimandres & Vike',
// },
// {
// avatar: contributorsAvatars.Demivan,
// name: 'Ivan Demchuk',
// github: 'Demivan',
// twitter: 'IvanDemchuk',
// title: 'A tech lead, fullstack developer',
// desc: 'Author of fluent-vue',
// },
// {
// avatar: contributorsAvatars.userquin,
// name: 'Joaquín Sánchez',
// github: 'userquin',
// twitter: 'userquin',
// title: 'A fullstack and android developer',
// desc: "Vite's fanatical follower",
// },
// {
// avatar: contributorsAvatars.zxch3n,
// name: 'Zixuan Chen',
// github: 'zxch3n',
// twitter: 'zxch3n',
// title: 'A fullstack developer',
// desc: 'Creating tools for collaboration',
// },
// ];
const plainTeamMembers: CoreTeam[] = [
{
github: 'knsv',
avatar: contributorsAvatars.knsv,
name: 'Knut Sveidqvist',
title: 'Creator',
twitter: 'knutsveidqvist',
sponsor: 'https://github.com/sponsors/knsv',
},
{
github: 'NeilCuzon',
avatar: contributorsAvatars.NeilCuzon,
name: 'Neil Cuzon',
title: 'Developer'
},
{
github: 'tylerlong',
avatar: contributorsAvatars.tylerlong,
name: 'Tyler Liu',
title: 'Developer'
},
{
github: 'sidharthv96',
avatar: contributorsAvatars.sidharthv96,
name: 'Sidharth Vinod',
title: 'Developer',
twitter: 'sidv42',
mastodon: 'https://techhub.social/@sidv',
sponsor: 'https://github.com/sponsors/sidharthv96',
linkedIn: 'sidharth-vinod',
website: 'https://sidharth.dev'
},
{
github: 'ashishjain0512',
avatar: contributorsAvatars.ashishjain0512,
name: 'Ashish Jain',
title: 'Developer'
},
{
github: 'mmorel-35',
avatar: contributorsAvatars['mmorel-35'],
name: 'Matthieu Morel',
title: 'Developer',
linkedIn: 'matthieumorel35'
},
{
github: 'aloisklink',
avatar: contributorsAvatars.aloisklink,
name: 'Alois Klink',
title: 'Developer',
linkedIn: 'aloisklink',
website: 'https://aloisklink.com'
},
{
github: 'pbrolin47',
avatar: contributorsAvatars.pbrolin47,
name: 'Per Brolin',
title: 'Developer'
},
{
github: 'Yash-Singh1',
avatar: contributorsAvatars['Yash-Singh1'],
name: 'Yash Singh',
title: 'Developer'
},
{
github: 'GDFaber',
avatar: contributorsAvatars.GDFaber,
name: 'Marc Faber',
title: 'Developer',
linkedIn: 'marc-faber'
},
{
github: 'MindaugasLaganeckas',
avatar: contributorsAvatars.MindaugasLaganeckas,
name: 'Mindaugas Laganeckas',
title: 'Developer'
},
{
github: 'jgreywolf',
avatar: contributorsAvatars.jgreywolf,
name: 'Justin Greywolf',
title: 'Developer'
},
{
github: 'IOrlandoni',
avatar: contributorsAvatars.IOrlandoni,
name: 'Nacho Orlandoni',
title: 'Developer'
},
]

// const teamMembers = plainTeamMembers.map((tm) => createLinks(tm));
const teamMembers = plainTeamMembers.map(tm => createLinks(tm))
teamMembers.sort((a, b) => contributorNames.indexOf(a.github) - contributorNames.indexOf(b.github))

// export { teamMembers };
export { teamMembers }
Loading

0 comments on commit 00a14ee

Please sign in to comment.