diff --git a/demo/astro.config.mjs b/demo/astro.config.mjs index 882e651..4890b6f 100644 --- a/demo/astro.config.mjs +++ b/demo/astro.config.mjs @@ -1,4 +1,4 @@ -import { defineConfig } from 'astro/config'; +import { defineConfig } from 'astro/config' // https://astro.build/config -export default defineConfig({}); +export default defineConfig({}) diff --git a/demo/src/pages/index.astro b/demo/src/pages/index.astro index daa7983..7d75423 100644 --- a/demo/src/pages/index.astro +++ b/demo/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import GithubStats from '../../../'; +import GithubStats from '../../../' --- diff --git a/demo/tsconfig.json b/demo/tsconfig.json index 3fd7ae6..fbc2f5f 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -1,3 +1,3 @@ { "extends": "astro/tsconfigs/strictest" -} \ No newline at end of file +} diff --git a/index.ts b/index.ts index 8bc1560..aa56050 100644 --- a/index.ts +++ b/index.ts @@ -1,3 +1,3 @@ -import GithubStats from './src/GithubStats.astro'; -export default GithubStats; -export * from './src/GithubStats.astro'; +import GithubStats from './src/GithubStats.astro' +export default GithubStats +export * from './src/GithubStats.astro' diff --git a/src/GithubStats.astro b/src/GithubStats.astro index 2a9858f..51ee0bc 100644 --- a/src/GithubStats.astro +++ b/src/GithubStats.astro @@ -1,28 +1,28 @@ --- export interface Props { - username: string; - topLanguages?: boolean; - repo?: string; - showIcons?: boolean; - altText?: string; + username: string + topLanguages?: boolean + repo?: string + showIcons?: boolean + altText?: string } -const { username, repo, topLanguages, showIcons, altText } = Astro.props; -const baseUrl = 'https://github-readme-stats.vercel.app/api/'; -let url = `${baseUrl}?username=${username}&show_icons=${!!showIcons}`; +const { username, repo, topLanguages, showIcons, altText } = Astro.props +const baseUrl = 'https://github-readme-stats.vercel.app/api/' +let url = `${baseUrl}?username=${username}&show_icons=${!!showIcons}` -let alt = `GitHub stats for account: ${username}`; +let alt = `GitHub stats for account: ${username}` if (repo) { - url = `${baseUrl}/pin/?username=${username}&repo=${repo}`; - alt = `GitHub stats for repository: ${username}/${repo}`; + url = `${baseUrl}/pin/?username=${username}&repo=${repo}` + alt = `GitHub stats for repository: ${username}/${repo}` } if (topLanguages) { - url = `${baseUrl}top-langs?username=${username}`; - alt = `GitHub top languages for account: ${username}`; + url = `${baseUrl}top-langs?username=${username}` + alt = `GitHub top languages for account: ${username}` } -alt = altText || alt; +alt = altText || alt --- {alt}