mirror of
https://github.com/LukeHagar/sveltesociety.dev.git
synced 2025-12-06 04:21:38 +00:00
feat: Separate github and gitlab scripts (#526)
* feat: Add updateGitlab.js * feat: Add updateGithub.js * Remove stars action * Remove @actions/core * Add injectors * Fix matching repo URLs * Format * Simplify injectData * Add shared chunk.js file
This commit is contained in:
9
.github/actions/update-stars/action.yml
vendored
9
.github/actions/update-stars/action.yml
vendored
@@ -1,9 +0,0 @@
|
||||
name: Update stars
|
||||
description: Update Github stars count
|
||||
inputs:
|
||||
token:
|
||||
description: GitHub token for GraphQL calls
|
||||
required: false
|
||||
runs:
|
||||
using: node20
|
||||
main: 'main.js'
|
||||
188
.github/actions/update-stars/main.js
vendored
188
.github/actions/update-stars/main.js
vendored
@@ -1,188 +0,0 @@
|
||||
import core from '@actions/core';
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import components from '../../../src/routes/components/components.json' assert { type: 'json' };
|
||||
import templates from '../../../src/routes/templates/templates.json' assert { type: 'json' };
|
||||
import tools from '../../../src/routes/tools/tools.json' assert { type: 'json' };
|
||||
|
||||
const ghGraphQlUrl = 'https://api.github.com/graphql';
|
||||
const gitlabGraphQlUrl = 'https://gitlab.com/api/graphql';
|
||||
const githubNameRegexp = new RegExp(
|
||||
'https://github.com/([a-zA-Z0-9][a-zA-Z0-9-]{0,38}/[a-zA-Z0-9._-]{1,100})'
|
||||
);
|
||||
const gitlabNameRegExp = new RegExp('https://gitlab.com/([\\w-]+/[\\w-]+)');
|
||||
|
||||
async function doGraphQlQuery(url, query, headers = {}) {
|
||||
try {
|
||||
let fetchResponse = await fetch(url, {
|
||||
body: JSON.stringify({ query }),
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
...headers
|
||||
}
|
||||
});
|
||||
let data = await fetchResponse.json();
|
||||
return Object.values(data.data || {});
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function gatherUrls() {
|
||||
return [
|
||||
...components.map((component) => component.repository),
|
||||
...tools.map((tool) => tool.repository),
|
||||
...templates.map((template) => template.repository)
|
||||
];
|
||||
}
|
||||
|
||||
// Github
|
||||
|
||||
/**
|
||||
* Get all GitHub repositories
|
||||
* @returns {Array<{owner: string, repo: string}>}
|
||||
*/
|
||||
function getAllGHRepos() {
|
||||
return gatherUrls()
|
||||
.filter((url) => url !== false && githubNameRegexp.test(url))
|
||||
.map((gitHubUrl) => gitHubUrl.match(githubNameRegexp)[1].toLowerCase())
|
||||
.map((validName) => ({ owner: validName.split('/')[0], repo: validName.split('/')[1] }));
|
||||
}
|
||||
|
||||
function ghRepoGraphQl({ owner, repo }) {
|
||||
let identifier = owner + '_' + repo + '_' + Math.random() + '';
|
||||
identifier = identifier.replace(/[^a-zA-Z0-9_]/g, '_');
|
||||
identifier = identifier.replace(/^[0-9]/g, '_');
|
||||
return `${identifier}: repository(name: "${repo}", owner: "${owner}"){nameWithOwner stargazerCount}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Divide an array into multiple smaller array
|
||||
* @param {Array} input
|
||||
* @param {number} size
|
||||
* @return {Array<Array>}
|
||||
*/
|
||||
function chunk(input, size) {
|
||||
size = size < 1 ? 10 : size;
|
||||
const pages = Math.ceil(input.length / size);
|
||||
const final = [];
|
||||
for (let index = 0; index < pages; index++) {
|
||||
final.push(input.slice(index * size, (index + 1) * size));
|
||||
}
|
||||
return final;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of stars for all GitHub repositories.
|
||||
* The result is a Map where the key the repo name and the value is the number of stars.
|
||||
* @returns {Promise<Record<string, number>>}
|
||||
*/
|
||||
async function getGHStars() {
|
||||
const repoData = getAllGHRepos();
|
||||
core.info('Found ' + repoData.length + ' repositories');
|
||||
const pagedRepoData = chunk(repoData, 100);
|
||||
const pageCount = pagedRepoData.length;
|
||||
core.debug('Divide the repositories into ' + pageCount + ' pages (of 100 repositories)');
|
||||
let lines = [];
|
||||
for (let index = 0; index < pageCount; index++) {
|
||||
const page = pagedRepoData[index];
|
||||
core.debug('Running GraphQL for page ' + (index + 1) + '/' + pageCount);
|
||||
let body =
|
||||
'query{' + '\n' + page.map((repoInfo) => ghRepoGraphQl(repoInfo)).join('\n') + '\n' + '}';
|
||||
lines = [
|
||||
...lines,
|
||||
...(await doGraphQlQuery(ghGraphQlUrl, body, {
|
||||
authorization:
|
||||
'Bearer ' +
|
||||
core.getInput('token', {
|
||||
// required: true,
|
||||
trimWhitespace: true
|
||||
})
|
||||
}))
|
||||
];
|
||||
}
|
||||
return Object.fromEntries(
|
||||
lines
|
||||
.filter((line) => line?.nameWithOwner)
|
||||
.map((line) => [line.nameWithOwner.toLowerCase(), line.stargazerCount])
|
||||
.sort()
|
||||
);
|
||||
}
|
||||
|
||||
// Gitlab
|
||||
|
||||
/**
|
||||
* Get all GitLab repositories path (relative to GitLab root)
|
||||
* @returns {Array<string>}
|
||||
*/
|
||||
function getAllGitlabRepos() {
|
||||
return gatherUrls()
|
||||
.filter((url) => url !== false && gitlabNameRegExp.test(url))
|
||||
.map((url) => url.match(gitlabNameRegExp)[1]);
|
||||
}
|
||||
|
||||
function gitlabRepoGraphQl(name) {
|
||||
let identifier = name + '_' + Math.random() + '';
|
||||
identifier = identifier.replace(/[^a-zA-Z0-9_]+/g, '_');
|
||||
identifier = identifier.replace(/^[0-9]/g, '_');
|
||||
return `${identifier}: project(fullPath: "${name}"){starCount fullPath}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of stars for all Gitlab repositories.
|
||||
* The result is a Map where the key the repo name and the value is the number of stars.
|
||||
* @returns {Promise<Record<string, number>>}
|
||||
*/
|
||||
async function getGitlabStars() {
|
||||
const repoData = getAllGitlabRepos();
|
||||
core.info('Found ' + repoData.length + ' repositories');
|
||||
const pagedRepoData = chunk(repoData, 100);
|
||||
const pageCount = pagedRepoData.length;
|
||||
core.debug('Divide the repositories into ' + pageCount + ' pages (of 100 repositories)');
|
||||
let lines = [];
|
||||
for (let index = 0; index < pageCount; index++) {
|
||||
const page = pagedRepoData[index];
|
||||
core.debug('Running GraphQL for page ' + (index + 1) + '/' + pageCount);
|
||||
const body =
|
||||
'query{' + '\n' + page.map((repoInfo) => gitlabRepoGraphQl(repoInfo)).join('\n') + '\n' + '}';
|
||||
lines = [...lines, ...(await doGraphQlQuery(gitlabGraphQlUrl, body))];
|
||||
}
|
||||
return Object.fromEntries(
|
||||
lines
|
||||
.filter((line) => line?.fullPath)
|
||||
.map((line) => [line.fullPath.toLowerCase(), line.starCount])
|
||||
.sort()
|
||||
);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
core.startGroup('GitHub');
|
||||
const github = await getGHStars();
|
||||
core.endGroup();
|
||||
|
||||
core.startGroup('GitLab');
|
||||
const gitlab = await getGitlabStars();
|
||||
core.endGroup();
|
||||
|
||||
core.info(
|
||||
`\tGithub: ${Object.keys(github).length} repositories (${Object.values(github).reduce(
|
||||
(count, item) => count + item,
|
||||
0
|
||||
)} stars)`
|
||||
);
|
||||
core.info(
|
||||
`\tGitlab: ${Object.keys(gitlab).length} repositories (${Object.values(gitlab).reduce(
|
||||
(count, item) => count + item,
|
||||
0
|
||||
)} stars)`
|
||||
);
|
||||
writeFileSync('src/lib/data/stars.json', JSON.stringify({ github, gitlab }));
|
||||
}
|
||||
|
||||
try {
|
||||
core.info('Start');
|
||||
main().then(() => core.info('Done'));
|
||||
} catch (error) {
|
||||
core.setFailed(error);
|
||||
}
|
||||
12
.github/workflows/fetch-latest-data.yml
vendored
12
.github/workflows/fetch-latest-data.yml
vendored
@@ -19,10 +19,12 @@ jobs:
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Update stars
|
||||
uses: ./.github/actions/update-stars
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Update github data
|
||||
run: node scripts/updateGithub.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Update gitlab data
|
||||
run: node scripts/updateGitlab.js
|
||||
- name: Update npm data
|
||||
run: node scripts/updateNpm.js
|
||||
- name: Update publint data
|
||||
@@ -36,6 +38,6 @@ jobs:
|
||||
title: "🤖 Update data"
|
||||
body: Automatically fetch latest data from GitHub, GitLab, NPM and Publint.
|
||||
branch: ci-update-data
|
||||
add-paths: src/lib/data/npm.json,src/lib/data/publint.json,src/lib/data/stars.json
|
||||
add-paths: src/lib/data/github.json,src/lib/data/gitlab.json,src/lib/data/npm.json,src/lib/data/publint.json
|
||||
delete-branch: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
"format": "prettier --write ./**/*.{js,cjs,ts,css,md,svx,svelte,html,json}"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@macfja/svelte-persistent-store": "2.4.1",
|
||||
"@sindresorhus/slugify": "^2.2.1",
|
||||
"@sveltejs/adapter-netlify": "^3.0.0",
|
||||
|
||||
39
pnpm-lock.yaml
generated
39
pnpm-lock.yaml
generated
@@ -5,9 +5,6 @@ settings:
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
devDependencies:
|
||||
'@actions/core':
|
||||
specifier: ^1.10.1
|
||||
version: 1.10.1
|
||||
'@macfja/svelte-persistent-store':
|
||||
specifier: 2.4.1
|
||||
version: 2.4.1(svelte@4.2.8)
|
||||
@@ -112,20 +109,6 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/@actions/core@1.10.1:
|
||||
resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==}
|
||||
dependencies:
|
||||
'@actions/http-client': 2.2.0
|
||||
uuid: 8.3.2
|
||||
dev: true
|
||||
|
||||
/@actions/http-client@2.2.0:
|
||||
resolution: {integrity: sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==}
|
||||
dependencies:
|
||||
tunnel: 0.0.6
|
||||
undici: 5.28.2
|
||||
dev: true
|
||||
|
||||
/@ampproject/remapping@2.2.1:
|
||||
resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
@@ -369,11 +352,6 @@ packages:
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@fastify/busboy@2.1.0:
|
||||
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@humanwhocodes/config-array@0.11.13:
|
||||
resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
|
||||
engines: {node: '>=10.10.0'}
|
||||
@@ -2590,11 +2568,6 @@ packages:
|
||||
typescript: 5.3.3
|
||||
dev: true
|
||||
|
||||
/tunnel@0.0.6:
|
||||
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
|
||||
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
|
||||
dev: true
|
||||
|
||||
/type-check@0.4.0:
|
||||
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@@ -2626,13 +2599,6 @@ packages:
|
||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||
dev: true
|
||||
|
||||
/undici@5.28.2:
|
||||
resolution: {integrity: sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==}
|
||||
engines: {node: '>=14.0'}
|
||||
dependencies:
|
||||
'@fastify/busboy': 2.1.0
|
||||
dev: true
|
||||
|
||||
/unist-util-is@6.0.0:
|
||||
resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
|
||||
dependencies:
|
||||
@@ -2670,11 +2636,6 @@ packages:
|
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||
dev: true
|
||||
|
||||
/uuid@8.3.2:
|
||||
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/vfile-message@2.0.4:
|
||||
resolution: {integrity: sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==}
|
||||
dependencies:
|
||||
|
||||
15
scripts/chunk.js
Normal file
15
scripts/chunk.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Divide an array into multiple smaller array
|
||||
* @param {Array} input
|
||||
* @param {number} size
|
||||
* @return {Array<Array>}
|
||||
*/
|
||||
export function chunk(input, size) {
|
||||
size = size < 1 ? 10 : size;
|
||||
const pages = Math.ceil(input.length / size);
|
||||
const final = [];
|
||||
for (let index = 0; index < pages; index++) {
|
||||
final.push(input.slice(index * size, (index + 1) * size));
|
||||
}
|
||||
return final;
|
||||
}
|
||||
92
scripts/updateGithub.js
Normal file
92
scripts/updateGithub.js
Normal file
@@ -0,0 +1,92 @@
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import { componentsSchema, templatesSchema, toolsSchema } from '../src/lib/schemas.js';
|
||||
import components from '../src/routes/components/components.json' assert { type: 'json' };
|
||||
import templates from '../src/routes/templates/templates.json' assert { type: 'json' };
|
||||
import tools from '../src/routes/tools/tools.json' assert { type: 'json' };
|
||||
import { chunk } from './chunk.js';
|
||||
|
||||
const ghGraphQlUrl = 'https://api.github.com/graphql';
|
||||
const githubNameRegexp = new RegExp(
|
||||
'https://github.com/([a-zA-Z0-9][a-zA-Z0-9-]{0,38}/[a-zA-Z0-9._-]{1,100})'
|
||||
);
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @param {string} query
|
||||
* @return {Promise<any[]>}
|
||||
*/
|
||||
async function doGraphQlQuery(url, query) {
|
||||
try {
|
||||
let fetchResponse = await fetch(url, {
|
||||
body: JSON.stringify({ query }),
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
authorization: `Bearer ${process.env.GITHUB_TOKEN}`
|
||||
}
|
||||
});
|
||||
let data = await fetchResponse.json();
|
||||
return Object.values(data.data || {});
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function getAllGHRepos() {
|
||||
const repos = [
|
||||
...componentsSchema.parse(components).map((component) => component.repository),
|
||||
...templatesSchema.parse(templates).map((template) => template.repository),
|
||||
...toolsSchema.parse(tools).map((tool) => tool.repository)
|
||||
];
|
||||
return repos.filter((url) => url && githubNameRegexp.test(url));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
*/
|
||||
function ghRepoGraphQl(url) {
|
||||
const name = url.match(githubNameRegexp)[1];
|
||||
const [owner, repo] = name.toLowerCase().split('/');
|
||||
let identifier = owner + '_' + repo + '_' + Math.random() + '';
|
||||
identifier = identifier.replace(/[^a-zA-Z0-9_]/g, '_');
|
||||
identifier = identifier.replace(/^[0-9]/g, '_');
|
||||
return `${identifier}: repository(name: "${repo}", owner: "${owner}"){url stargazerCount}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of stars for all GitHub repositories.
|
||||
* The result is a Map where the key the repo name and the value is the number of stars.
|
||||
* @returns {Promise<Record<string, {stars: number}>>}
|
||||
*/
|
||||
async function getGHStars() {
|
||||
const repoData = getAllGHRepos();
|
||||
console.log('Found ' + repoData.length + ' repositories');
|
||||
const pagedRepoData = chunk(repoData, 100);
|
||||
const pageCount = pagedRepoData.length;
|
||||
let lines = [];
|
||||
for (let index = 0; index < pageCount; index++) {
|
||||
const page = pagedRepoData[index];
|
||||
console.log('Running GraphQL for page ' + (index + 1) + '/' + pageCount);
|
||||
let body =
|
||||
'query{' + '\n' + page.map((repoInfo) => ghRepoGraphQl(repoInfo)).join('\n') + '\n' + '}';
|
||||
lines.push(...(await doGraphQlQuery(ghGraphQlUrl, body)));
|
||||
}
|
||||
return Object.fromEntries(
|
||||
lines
|
||||
.filter((line) => line?.url)
|
||||
.map((line) => [line.url.toLowerCase(), { stars: line.stargazerCount }])
|
||||
.sort()
|
||||
);
|
||||
}
|
||||
|
||||
const github = await getGHStars();
|
||||
|
||||
console.log(
|
||||
`Github: ${Object.keys(github).length} repositories (${Object.values(github).reduce(
|
||||
(count, item) => count + item.stars,
|
||||
0
|
||||
)} stars)`
|
||||
);
|
||||
|
||||
writeFileSync('src/lib/data/github.json', JSON.stringify(github));
|
||||
89
scripts/updateGitlab.js
Normal file
89
scripts/updateGitlab.js
Normal file
@@ -0,0 +1,89 @@
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import { componentsSchema, templatesSchema, toolsSchema } from '../src/lib/schemas.js';
|
||||
import components from '../src/routes/components/components.json' assert { type: 'json' };
|
||||
import templates from '../src/routes/templates/templates.json' assert { type: 'json' };
|
||||
import tools from '../src/routes/tools/tools.json' assert { type: 'json' };
|
||||
import { chunk } from './chunk.js';
|
||||
|
||||
const gitlabGraphQlUrl = 'https://gitlab.com/api/graphql';
|
||||
const gitlabNameRegExp = new RegExp('https://gitlab.com/([\\w-]+/[\\w-]+)');
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @param {string} query
|
||||
* @return {Promise<any[]>}
|
||||
*/
|
||||
async function doGraphQlQuery(url, query) {
|
||||
try {
|
||||
let fetchResponse = await fetch(url, {
|
||||
body: JSON.stringify({ query }),
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
});
|
||||
let data = await fetchResponse.json();
|
||||
return Object.values(data.data || {});
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function getAllGitlabRepos() {
|
||||
const repos = [
|
||||
...componentsSchema.parse(components).map((component) => component.repository),
|
||||
...templatesSchema.parse(templates).map((template) => template.repository),
|
||||
...toolsSchema.parse(tools).map((tool) => tool.repository)
|
||||
];
|
||||
return repos.filter((url) => url && gitlabNameRegExp.test(url));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
*/
|
||||
function gitlabRepoGraphQl(url) {
|
||||
const name = url.match(gitlabNameRegExp)[1];
|
||||
let identifier = name + '_' + Math.random() + '';
|
||||
identifier = identifier.replace(/[^a-zA-Z0-9_]+/g, '_');
|
||||
identifier = identifier.replace(/^[0-9]/g, '_');
|
||||
return `${identifier}: project(fullPath: "${name}"){starCount webUrl}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of stars for all Gitlab repositories.
|
||||
* The result is a Map where the key the repo name and the value is the number of stars.
|
||||
* @returns {Promise<Record<string, {stars: number}>>}
|
||||
*/
|
||||
async function getGitlabStars() {
|
||||
const repoData = getAllGitlabRepos();
|
||||
console.log('Found ' + repoData.length + ' repositories');
|
||||
const pagedRepoData = chunk(repoData, 100);
|
||||
const pageCount = pagedRepoData.length;
|
||||
let lines = [];
|
||||
for (let index = 0; index < pageCount; index++) {
|
||||
const page = pagedRepoData[index];
|
||||
console.log('Running GraphQL for page ' + (index + 1) + '/' + pageCount);
|
||||
const body =
|
||||
'query{' + '\n' + page.map((repoInfo) => gitlabRepoGraphQl(repoInfo)).join('\n') + '\n' + '}';
|
||||
lines.push(...(await doGraphQlQuery(gitlabGraphQlUrl, body)));
|
||||
}
|
||||
|
||||
return Object.fromEntries(
|
||||
lines
|
||||
.filter((line) => line?.webUrl)
|
||||
.map((line) => [line.webUrl.toLowerCase(), { stars: line.starCount }])
|
||||
.sort()
|
||||
);
|
||||
}
|
||||
|
||||
const gitlab = await getGitlabStars();
|
||||
|
||||
console.log(
|
||||
`Gitlab: ${Object.keys(gitlab).length} repositories (${Object.values(gitlab).reduce(
|
||||
(count, item) => count + item.stars,
|
||||
0
|
||||
)} stars)`
|
||||
);
|
||||
|
||||
writeFileSync('src/lib/data/gitlab.json', JSON.stringify(gitlab));
|
||||
474
src/lib/data/github.json
Normal file
474
src/lib/data/github.json
Normal file
@@ -0,0 +1,474 @@
|
||||
{
|
||||
"https://github.com/6edesign/svelte-calendar": { "stars": 527 },
|
||||
"https://github.com/aantusahaa/svelte-remixicon": { "stars": 36 },
|
||||
"https://github.com/abaga129/sveltekit-adapter-iis": { "stars": 2 },
|
||||
"https://github.com/abosch19/svelte-fast-marquee": { "stars": 29 },
|
||||
"https://github.com/agnosticui/agnosticui": { "stars": 684 },
|
||||
"https://github.com/agusid/boilerplate-svelte": { "stars": 60 },
|
||||
"https://github.com/agustinl/svelte-tags-input": { "stars": 281 },
|
||||
"https://github.com/alessiogr/sveltekit-windicss-flowbite-template": { "stars": 3 },
|
||||
"https://github.com/alexprey/sveltedoc-parser": { "stars": 90 },
|
||||
"https://github.com/alexxnb/aovi-svelte": { "stars": 11 },
|
||||
"https://github.com/alexxnb/svate": { "stars": 14 },
|
||||
"https://github.com/alexxnb/svelte-chota": { "stars": 290 },
|
||||
"https://github.com/alexxnb/svelte-eventbus": { "stars": 38 },
|
||||
"https://github.com/alexxnb/svelte-preprocess-markdown": { "stars": 134 },
|
||||
"https://github.com/alexxnb/tinro": { "stars": 671 },
|
||||
"https://github.com/alphapeter/fa-svelte": { "stars": 72 },
|
||||
"https://github.com/andrelmlins/svelte-fullscreen": { "stars": 61 },
|
||||
"https://github.com/andrelmlins/svelte-grid-responsive": { "stars": 51 },
|
||||
"https://github.com/andrelmlins/svelte-infinite-scroll": { "stars": 262 },
|
||||
"https://github.com/ankurrsinghal/svelte-legos": { "stars": 641 },
|
||||
"https://github.com/anotherempty/svelte-brick-gallery": { "stars": 36 },
|
||||
"https://github.com/antony/svelte-box": { "stars": 61 },
|
||||
"https://github.com/antony/sveltekit-adapter-browser-extension": { "stars": 158 },
|
||||
"https://github.com/any-tdf/stdf": { "stars": 511 },
|
||||
"https://github.com/appwrite/sdk-for-svelte": { "stars": 74 },
|
||||
"https://github.com/architect/sveltekit-adapter": { "stars": 9 },
|
||||
"https://github.com/arlac77/svelte-websocket-store": { "stars": 275 },
|
||||
"https://github.com/arthurgermano/svelte-client-router": { "stars": 14 },
|
||||
"https://github.com/axelen123/svelte-ts-template": { "stars": 21 },
|
||||
"https://github.com/ayndqy/svelte-micro": { "stars": 88 },
|
||||
"https://github.com/babichjacob/university-website": { "stars": 1 },
|
||||
"https://github.com/bartektelec/svelte-svg-transform": { "stars": 21 },
|
||||
"https://github.com/baseballyama/svelte-preprocess-delegate-events": { "stars": 42 },
|
||||
"https://github.com/beartocode/mismerge": { "stars": 21 },
|
||||
"https://github.com/beerui/beerui": { "stars": 69 },
|
||||
"https://github.com/benjazehr/svelte-example-museums": { "stars": 29 },
|
||||
"https://github.com/bernhardwebstudio/svelte-virtual-table": { "stars": 19 },
|
||||
"https://github.com/bestguy/sveltestrap": { "stars": 1290 },
|
||||
"https://github.com/beyonk-group/gdpr-cookie-consent-banner": { "stars": 228 },
|
||||
"https://github.com/beyonk-group/svelte-carousel": { "stars": 213 },
|
||||
"https://github.com/beyonk-group/svelte-facebook-customer-chat": { "stars": 6 },
|
||||
"https://github.com/beyonk-group/svelte-facebook-pixel": { "stars": 16 },
|
||||
"https://github.com/beyonk-group/svelte-google-analytics": { "stars": 75 },
|
||||
"https://github.com/beyonk-group/svelte-googlemaps": { "stars": 70 },
|
||||
"https://github.com/beyonk-group/svelte-mapbox": { "stars": 323 },
|
||||
"https://github.com/beyonk-group/svelte-notifications": { "stars": 309 },
|
||||
"https://github.com/beyonk-group/svelte-scrollspy": { "stars": 37 },
|
||||
"https://github.com/beyonk-group/svelte-simple-icons": { "stars": 13 },
|
||||
"https://github.com/beyonk-group/svelte-trustpilot": { "stars": 4 },
|
||||
"https://github.com/bholmesdev/svelte-starter-template": { "stars": 43 },
|
||||
"https://github.com/blade67/sveltron": { "stars": 64 },
|
||||
"https://github.com/bluwy/svelte-router": { "stars": 31 },
|
||||
"https://github.com/bohnacker/svelte-number-spinner": { "stars": 24 },
|
||||
"https://github.com/bonosoft/sveltekit-codeentry": { "stars": 0 },
|
||||
"https://github.com/bonosoft/sveltekit-progress": { "stars": 0 },
|
||||
"https://github.com/bonosoft/sveltekit-qrcode": { "stars": 3 },
|
||||
"https://github.com/born05/sveltekit-proxy": { "stars": 2 },
|
||||
"https://github.com/brandonxiang/svelte-webpack-mpa": { "stars": 23 },
|
||||
"https://github.com/brunomolteni/svelte-sortable-list": { "stars": 121 },
|
||||
"https://github.com/bsssshhhhhhh/svelte-data-grid": { "stars": 199 },
|
||||
"https://github.com/budgetdraw/sveltekit-cloudflare-adapter": { "stars": 7 },
|
||||
"https://github.com/buhrmi/query-store": { "stars": 44 },
|
||||
"https://github.com/c0bra/svelma": { "stars": 531 },
|
||||
"https://github.com/captaincodeman/svelte-headlessui": { "stars": 458 },
|
||||
"https://github.com/carbon-design-system/carbon-components-svelte": { "stars": 2538 },
|
||||
"https://github.com/carlosv2/adapter-node-ws": { "stars": 16 },
|
||||
"https://github.com/casual-ui/casual-ui": { "stars": 51 },
|
||||
"https://github.com/cerebral/overmind": { "stars": 1558 },
|
||||
"https://github.com/chadulous/svodals": { "stars": 1 },
|
||||
"https://github.com/chainlist/svelte-forms": { "stars": 406 },
|
||||
"https://github.com/chanced/filedrop-svelte": { "stars": 106 },
|
||||
"https://github.com/chanced/focus-svelte": { "stars": 27 },
|
||||
"https://github.com/charlyjazz/svelte-credit-card": { "stars": 49 },
|
||||
"https://github.com/chuanqisun/svelte-electron-template": { "stars": 12 },
|
||||
"https://github.com/cibernox/svelte-intl-precompile": { "stars": 265 },
|
||||
"https://github.com/ciscoheat/sveltekit-superforms": { "stars": 1510 },
|
||||
"https://github.com/coc-extensions/coc-svelte": { "stars": 175 },
|
||||
"https://github.com/codediodeio/sveltefire": { "stars": 1496 },
|
||||
"https://github.com/colinbate/svelte-ts-tailwind-template": { "stars": 69 },
|
||||
"https://github.com/collardeau/svelte-headroom": { "stars": 76 },
|
||||
"https://github.com/consoletvs/sswr": { "stars": 205 },
|
||||
"https://github.com/corneliusio/svelte-sublime": { "stars": 57 },
|
||||
"https://github.com/cweili/svelte-fa": { "stars": 360 },
|
||||
"https://github.com/dafn/svelte-typescript-parcel": { "stars": 51 },
|
||||
"https://github.com/dafn/svelte-typescript-rollup": { "stars": 78 },
|
||||
"https://github.com/dasdaniel/svelte-table": { "stars": 465 },
|
||||
"https://github.com/daybrush/moveable": { "stars": 9061 },
|
||||
"https://github.com/daybrush/ruler": { "stars": 274 },
|
||||
"https://github.com/daybrush/selecto": { "stars": 1814 },
|
||||
"https://github.com/demoorjasper/parcel-plugin-svelte": { "stars": 235 },
|
||||
"https://github.com/devghost/svelte": { "stars": 7 },
|
||||
"https://github.com/devshamim/svelte-unicons": { "stars": 2 },
|
||||
"https://github.com/dhyeymoliya/svelte-form-validation": { "stars": 2 },
|
||||
"https://github.com/dmitrykurmanov/waxwing-rating": { "stars": 6 },
|
||||
"https://github.com/dmvvilela/svelte-scrollactive": { "stars": 4 },
|
||||
"https://github.com/dopry/svelte-auth0": { "stars": 72 },
|
||||
"https://github.com/dyalicode/svelte-formly": { "stars": 245 },
|
||||
"https://github.com/dylanblokhuis/svelte-feather-icons": { "stars": 129 },
|
||||
"https://github.com/easylogic/svelte-summernote": { "stars": 11 },
|
||||
"https://github.com/efeskucuk/svelte-color-picker": { "stars": 100 },
|
||||
"https://github.com/ekhaled/svelte-dev-helper": { "stars": 6 },
|
||||
"https://github.com/elsonigo/svelte-ie11": { "stars": 3 },
|
||||
"https://github.com/emh333/esbuild-svelte": { "stars": 220 },
|
||||
"https://github.com/emiltholin/svelte-routing": { "stars": 1934 },
|
||||
"https://github.com/emrekara37/svelte-rate-it": { "stars": 39 },
|
||||
"https://github.com/endenwer/svelte-restate": { "stars": 21 },
|
||||
"https://github.com/equipmentshare/date-range-input": { "stars": 15 },
|
||||
"https://github.com/erokar/svelte-stopwatch": { "stars": 1 },
|
||||
"https://github.com/esinx/svelte-tree": { "stars": 22 },
|
||||
"https://github.com/ethercorps/svedev": { "stars": 7 },
|
||||
"https://github.com/evanleck/vim-svelte": { "stars": 297 },
|
||||
"https://github.com/farhan2106/svelte-typescript": { "stars": 36 },
|
||||
"https://github.com/farhan2106/svelte-typescript-ssr": { "stars": 9 },
|
||||
"https://github.com/fede-rodes/hardhat-svelte-boilerplate": { "stars": 1 },
|
||||
"https://github.com/flekschas/svelte-simple-modal": { "stars": 414 },
|
||||
"https://github.com/fmaclen/svelte-currency-input": { "stars": 22 },
|
||||
"https://github.com/fusioncharts/svelte-fusioncharts": { "stars": 126 },
|
||||
"https://github.com/fxbois/web-mode": { "stars": 1604 },
|
||||
"https://github.com/gcbenlloch/svelte-cleavejs": { "stars": 7 },
|
||||
"https://github.com/geakstr/svelte-3-rollup-typescript-vscode": { "stars": 38 },
|
||||
"https://github.com/geoffcox/sterling-svelte": { "stars": 3 },
|
||||
"https://github.com/geoffrich/svelte-adapter-azure-swa": { "stars": 109 },
|
||||
"https://github.com/getsentry/sentry-javascript": { "stars": 7425 },
|
||||
"https://github.com/gitbreaker222/svelte-virtual-list": { "stars": 19 },
|
||||
"https://github.com/gitbreaker222/sveltestore": { "stars": 1 },
|
||||
"https://github.com/gornostay25/svelte-adapter-bun": { "stars": 433 },
|
||||
"https://github.com/guyromm/svelte-postgrest-template": { "stars": 52 },
|
||||
"https://github.com/gyurielf/svelte-tel-input": { "stars": 68 },
|
||||
"https://github.com/halfdanj/svelte-adapter-appengine": { "stars": 58 },
|
||||
"https://github.com/halfdanj/svelte-google-auth": { "stars": 40 },
|
||||
"https://github.com/halfnelson/svelte-native": { "stars": 1622 },
|
||||
"https://github.com/hedgehog125/sveltekit-adapter-versioned-worker": { "stars": 6 },
|
||||
"https://github.com/hellbutcher/parcel-transformer-svelte3-plus": { "stars": 5 },
|
||||
"https://github.com/himynameisdave/svelte-copyright": { "stars": 15 },
|
||||
"https://github.com/himynameisdave/svelte-flex": { "stars": 72 },
|
||||
"https://github.com/himynameisdave/svelte-frappe-charts": { "stars": 297 },
|
||||
"https://github.com/histoire-dev/histoire": { "stars": 2867 },
|
||||
"https://github.com/hperrin/svelte-material-ui": { "stars": 3205 },
|
||||
"https://github.com/huntabyte/shadcn-svelte": { "stars": 2274 },
|
||||
"https://github.com/idleberg/sveltekit-adapter-html-like": { "stars": 17 },
|
||||
"https://github.com/idris-maps/svelte-parts": { "stars": 46 },
|
||||
"https://github.com/ikun-svelte/ikun-ui": { "stars": 1104 },
|
||||
"https://github.com/illright/attractions": { "stars": 970 },
|
||||
"https://github.com/importantimport/urara": { "stars": 508 },
|
||||
"https://github.com/introvertuous/svelte-icons": { "stars": 280 },
|
||||
"https://github.com/italypaleale/svelte-spa-router": { "stars": 1428 },
|
||||
"https://github.com/itswadesh/svelte-commerce": { "stars": 1322 },
|
||||
"https://github.com/ivanhofer/sthemer": { "stars": 27 },
|
||||
"https://github.com/ivanhofer/typesafe-i18n": { "stars": 1954 },
|
||||
"https://github.com/ivanhofer/typesafe-i18n-demo-sveltekit": { "stars": 110 },
|
||||
"https://github.com/j2l/walk-and-graph-svelte-components": { "stars": 10 },
|
||||
"https://github.com/jacobmischka/svelte-flatpickr": { "stars": 153 },
|
||||
"https://github.com/jacwright/svelte-navaid": { "stars": 17 },
|
||||
"https://github.com/jamen/svelte-router": { "stars": 7 },
|
||||
"https://github.com/janosh/svelte-bricks": { "stars": 75 },
|
||||
"https://github.com/janosh/svelte-multiselect": { "stars": 239 },
|
||||
"https://github.com/janosh/svelte-toc": { "stars": 89 },
|
||||
"https://github.com/jasongitmail/super-sitemap": { "stars": 59 },
|
||||
"https://github.com/jerriclynsjohn/svelte-storybook-tailwind": { "stars": 306 },
|
||||
"https://github.com/jiangfengming/svelte-preprocess-css-hash": { "stars": 8 },
|
||||
"https://github.com/jiangfengming/svelte-preprocess-html-asset": { "stars": 3 },
|
||||
"https://github.com/jikkai/svelte-router": { "stars": 62 },
|
||||
"https://github.com/jill64/svelte-inline-modal": { "stars": 3 },
|
||||
"https://github.com/jill64/sveltekit-adapter-aws": { "stars": 3 },
|
||||
"https://github.com/jimutt/svelte-pick-a-place": { "stars": 54 },
|
||||
"https://github.com/joaquimnetocel/svelte-datatables-net": { "stars": 24 },
|
||||
"https://github.com/joeinnes/svelte-image": { "stars": 3 },
|
||||
"https://github.com/joemmalatesta/sveltekit-pwa-guide": { "stars": 0 },
|
||||
"https://github.com/john--kane/svelteml": { "stars": 72 },
|
||||
"https://github.com/johnwalley/compare-image-slider": { "stars": 16 },
|
||||
"https://github.com/jorgegorka/svelte-firebase": { "stars": 228 },
|
||||
"https://github.com/jorgegorka/svelte-router": { "stars": 497 },
|
||||
"https://github.com/jthegedus/svelte-adapter-firebase": { "stars": 277 },
|
||||
"https://github.com/juliuslipp/sveltekit-shadcn-ai": { "stars": 3 },
|
||||
"https://github.com/justinekizhak/svelte-tailwind-template": { "stars": 2 },
|
||||
"https://github.com/jycouet/kitql": { "stars": 349 },
|
||||
"https://github.com/k-sato1995/sveltekit-blog-template": { "stars": 27 },
|
||||
"https://github.com/kaisermann/svelte-css-vars": { "stars": 234 },
|
||||
"https://github.com/kaisermann/svelte-i18n": { "stars": 1106 },
|
||||
"https://github.com/kaisermann/svelte-loadable": { "stars": 319 },
|
||||
"https://github.com/kaladivo/svelte-kit-koa-boilerplate": { "stars": 3 },
|
||||
"https://github.com/kazzkiq/svero": { "stars": 203 },
|
||||
"https://github.com/kbrgl/svelte-french-toast": { "stars": 657 },
|
||||
"https://github.com/keenethics/svelte-notifications": { "stars": 586 },
|
||||
"https://github.com/kenkunz/svelte-fsm": { "stars": 264 },
|
||||
"https://github.com/kenoxa/svelte-fragment-component": { "stars": 4 },
|
||||
"https://github.com/kenoxa/svelte-htm": { "stars": 21 },
|
||||
"https://github.com/kenoxa/svelte-jsx": { "stars": 33 },
|
||||
"https://github.com/kevmodrome/svelte-favicon-badge": { "stars": 101 },
|
||||
"https://github.com/kevmodrome/svelte-preprocessor-fetch": { "stars": 50 },
|
||||
"https://github.com/kindoflew/svelte-parallax": { "stars": 136 },
|
||||
"https://github.com/kokizzu/svelte-mpa": { "stars": 75 },
|
||||
"https://github.com/koljal/sk-authjs": { "stars": 1 },
|
||||
"https://github.com/kolodziejczak-sz/svelte-redux-connect": { "stars": 17 },
|
||||
"https://github.com/korywka/svelte-slider": { "stars": 12 },
|
||||
"https://github.com/ktsn/svelte-jest": { "stars": 37 },
|
||||
"https://github.com/kwchang0831/svelte-qwer": { "stars": 390 },
|
||||
"https://github.com/l-portet/svelte-switch-case": { "stars": 136 },
|
||||
"https://github.com/laosb/sveltenova": { "stars": 20 },
|
||||
"https://github.com/leafoftree/vim-svelte-plugin": { "stars": 125 },
|
||||
"https://github.com/lemmon/tablog-svelte": { "stars": 25 },
|
||||
"https://github.com/leodog896/svelte-reparent": { "stars": 7 },
|
||||
"https://github.com/leshak/svelte-icons-pack": { "stars": 47 },
|
||||
"https://github.com/lightning-jar/svelte-typescript-tailwind-pug-starter": { "stars": 10 },
|
||||
"https://github.com/liyuanqiu/echarts-for-svelte": { "stars": 25 },
|
||||
"https://github.com/lottiefiles/svelte-lottie-player": { "stars": 117 },
|
||||
"https://github.com/lpshanley/svelte-phonegap": { "stars": 9 },
|
||||
"https://github.com/ls-age/svelte-preprocess-less": { "stars": 13 },
|
||||
"https://github.com/ls-age/svelte-preprocess-sass": { "stars": 92 },
|
||||
"https://github.com/lucia-auth/lucia": { "stars": 4478 },
|
||||
"https://github.com/lucide-icons/lucide": { "stars": 6810 },
|
||||
"https://github.com/lukeed/pwa": { "stars": 3120 },
|
||||
"https://github.com/lunatk/svelte-web-component-builder": { "stars": 4 },
|
||||
"https://github.com/macfja/svelte-adapter-multi": { "stars": 16 },
|
||||
"https://github.com/macfja/svelte-adapter-neutralino": { "stars": 14 },
|
||||
"https://github.com/macfja/svelte-expirable": { "stars": 3 },
|
||||
"https://github.com/macfja/svelte-invalidable": { "stars": 5 },
|
||||
"https://github.com/macfja/svelte-oauth2": { "stars": 37 },
|
||||
"https://github.com/macfja/svelte-persistent-store": { "stars": 220 },
|
||||
"https://github.com/macfja/svelte-scroll-video": { "stars": 1 },
|
||||
"https://github.com/macfja/svelte-undoable": { "stars": 44 },
|
||||
"https://github.com/maciekgrzybek/svelte-inview": { "stars": 639 },
|
||||
"https://github.com/mailcheck-co/mailcheck.site": { "stars": 10 },
|
||||
"https://github.com/malynium/svelte-adapter-github": { "stars": 41 },
|
||||
"https://github.com/marcograhl/tailwindcss-svelte-starter": { "stars": 115 },
|
||||
"https://github.com/markoboy/svelte-webpack-babel-scss": { "stars": 7 },
|
||||
"https://github.com/mattjennings/svelte-modals": { "stars": 139 },
|
||||
"https://github.com/matyunya/smelte": { "stars": 1512 },
|
||||
"https://github.com/matyunya/svelte-image": { "stars": 716 },
|
||||
"https://github.com/matyunya/svelte-waypoint": { "stars": 83 },
|
||||
"https://github.com/mawa-ai/chat-embed": { "stars": 0 },
|
||||
"https://github.com/mdauner/sveltejs-forms": { "stars": 197 },
|
||||
"https://github.com/mefechoel/svelte-navigator": { "stars": 485 },
|
||||
"https://github.com/melt-ui/melt-ui": { "stars": 2129 },
|
||||
"https://github.com/meteor-svelte/meteor-svelte": { "stars": 113 },
|
||||
"https://github.com/metonym/svelte-pincode": { "stars": 20 },
|
||||
"https://github.com/mhkeller/layercake": { "stars": 1041 },
|
||||
"https://github.com/microsoft/fast": { "stars": 8759 },
|
||||
"https://github.com/milahu/svelte-preval": { "stars": 10 },
|
||||
"https://github.com/mskocik/svelecte": { "stars": 371 },
|
||||
"https://github.com/mskocik/svelty-picker": { "stars": 156 },
|
||||
"https://github.com/muhajirdev/svelte-tailwind-template": { "stars": 89 },
|
||||
"https://github.com/mvasigh/sveltekit-mdsvex-blog": { "stars": 146 },
|
||||
"https://github.com/n00nday/stwui": { "stars": 375 },
|
||||
"https://github.com/n0th1ng-else/svelte-typescript-sass": { "stars": 11 },
|
||||
"https://github.com/n3-rd/curseur": { "stars": 5 },
|
||||
"https://github.com/naver/egjs-flicking": { "stars": 2555 },
|
||||
"https://github.com/naver/egjs-infinitegrid": { "stars": 1770 },
|
||||
"https://github.com/navneetsharmaui/sveltekit-blog": { "stars": 176 },
|
||||
"https://github.com/navneetsharmaui/sveltekit-starter": { "stars": 568 },
|
||||
"https://github.com/nazimhali/svelte-template": { "stars": 4 },
|
||||
"https://github.com/nbgoodall/leblog": { "stars": 1 },
|
||||
"https://github.com/neighbourhoodie/svelte-pouchdb-couchdb": { "stars": 62 },
|
||||
"https://github.com/nerd-coder/svelte-zod-form": { "stars": 7 },
|
||||
"https://github.com/nguyentuansi/openai-quickstart-sveltekit": { "stars": 6 },
|
||||
"https://github.com/nickyhajal/svelte-tabs": { "stars": 92 },
|
||||
"https://github.com/noelmugnier/svelte-translate": { "stars": 10 },
|
||||
"https://github.com/nomangul/svelte-page-progress": { "stars": 17 },
|
||||
"https://github.com/noney1412/svelte-exstore": { "stars": 0 },
|
||||
"https://github.com/novacbn/kahi-ui": { "stars": 189 },
|
||||
"https://github.com/nstuyvesant/sveltekit-auth-example": { "stars": 267 },
|
||||
"https://github.com/ntsd/svelte-tex": { "stars": 6 },
|
||||
"https://github.com/ntsd/sveltekit-html-minifier": { "stars": 4 },
|
||||
"https://github.com/nubolab-ffwd/svelte-fluent": { "stars": 71 },
|
||||
"https://github.com/nye/svelte-electron-better-sqlite3-starter": { "stars": 20 },
|
||||
"https://github.com/okrad/svelte-progressbar": { "stars": 128 },
|
||||
"https://github.com/oli8/spaper": { "stars": 191 },
|
||||
"https://github.com/openfrenchfries/supasveltekit": { "stars": 24 },
|
||||
"https://github.com/ordinaryjellyfish/svelte-routing-template": { "stars": 15 },
|
||||
"https://github.com/oskar-gmerek/surreal-sveltekit": { "stars": 12 },
|
||||
"https://github.com/oslabs-beta/svault": { "stars": 67 },
|
||||
"https://github.com/ottomated/trpc-svelte-query": { "stars": 45 },
|
||||
"https://github.com/pablo-abc/felte": { "stars": 925 },
|
||||
"https://github.com/pablo-abc/svelte-markdown": { "stars": 275 },
|
||||
"https://github.com/pankod/svelte-boilerplate": { "stars": 289 },
|
||||
"https://github.com/panya/svelte-intl": { "stars": 49 },
|
||||
"https://github.com/paoloricciuti/sveltekit-search-params": { "stars": 339 },
|
||||
"https://github.com/paolotiu/svelte-boring-avatars": { "stars": 48 },
|
||||
"https://github.com/pateketrueke/svql": { "stars": 61 },
|
||||
"https://github.com/pateketrueke/yrv": { "stars": 162 },
|
||||
"https://github.com/patoi/svelte-component-library-template": { "stars": 67 },
|
||||
"https://github.com/patrickg/html-svelte-parser": { "stars": 12 },
|
||||
"https://github.com/paulmaly/svelte-content-loader": { "stars": 157 },
|
||||
"https://github.com/paulmaly/svelte-image-compare": { "stars": 20 },
|
||||
"https://github.com/paulmaly/svelte-imask": { "stars": 65 },
|
||||
"https://github.com/paulmaly/svelte-page-router": { "stars": 21 },
|
||||
"https://github.com/paulmaly/svelte-ticker": { "stars": 18 },
|
||||
"https://github.com/pavish/select-madu": { "stars": 51 },
|
||||
"https://github.com/pbastowski/svelte-poi-starter": { "stars": 10 },
|
||||
"https://github.com/pearofducks/svelte-match-media": { "stars": 38 },
|
||||
"https://github.com/perfect-things/ui": { "stars": 13 },
|
||||
"https://github.com/pilcrowonpaper/monaco": { "stars": 25 },
|
||||
"https://github.com/pixievoltno1/svelte-webext-storage-adapter": { "stars": 24 },
|
||||
"https://github.com/pixievoltno1/svelte-writable-derived": { "stars": 83 },
|
||||
"https://github.com/plihelix/wails-template-sveltekit": { "stars": 36 },
|
||||
"https://github.com/plrenaudin/svelte-storez": { "stars": 26 },
|
||||
"https://github.com/pluvial/svelte-adapter-deno": { "stars": 299 },
|
||||
"https://github.com/pngwn/mdsvex": { "stars": 2056 },
|
||||
"https://github.com/pngwn/svelte-adapter": { "stars": 286 },
|
||||
"https://github.com/pngwn/svelte-test": { "stars": 25 },
|
||||
"https://github.com/posandu/svelte-ripple-action": { "stars": 42 },
|
||||
"https://github.com/pragmatic-engineering/svelte-form-builder-community": { "stars": 50 },
|
||||
"https://github.com/prgm-dev/sveltekit-progress-bar": { "stars": 11 },
|
||||
"https://github.com/probablykasper/date-picker-svelte": { "stars": 253 },
|
||||
"https://github.com/probablykasper/svelte-droplet": { "stars": 24 },
|
||||
"https://github.com/proverbial-ninja/vscode-svelte-component-extractor": { "stars": 28 },
|
||||
"https://github.com/pstanoev/simple-svelte-autocomplete": { "stars": 431 },
|
||||
"https://github.com/ptkdev/sveltekit-cordova-adapter": { "stars": 38 },
|
||||
"https://github.com/ptkdev/sveltekit-electron-adapter": { "stars": 59 },
|
||||
"https://github.com/pyoner/svelte-typescript": { "stars": 210 },
|
||||
"https://github.com/qutran/svelte-inspector": { "stars": 83 },
|
||||
"https://github.com/qutran/swheel": { "stars": 43 },
|
||||
"https://github.com/radar-azdelta/svelte-datatable": { "stars": 0 },
|
||||
"https://github.com/radix-svelte/radix-svelte": { "stars": 468 },
|
||||
"https://github.com/reecelucas/svelte-accessible-dialog": { "stars": 26 },
|
||||
"https://github.com/rezi/svelte-gestures": { "stars": 95 },
|
||||
"https://github.com/rgossiaux/svelte-headlessui": { "stars": 1698 },
|
||||
"https://github.com/ricalamino/svelte-firebase-auth": { "stars": 51 },
|
||||
"https://github.com/rich-harris/pancake": { "stars": 1239 },
|
||||
"https://github.com/rich-harris/svelte-template-electron": { "stars": 89 },
|
||||
"https://github.com/rixo/rollup-plugin-svelte-hot": { "stars": 48 },
|
||||
"https://github.com/rixo/svelte-template-hot": { "stars": 60 },
|
||||
"https://github.com/rob-balfre/svelte-select": { "stars": 1171 },
|
||||
"https://github.com/robbrazier/svelte-awesome": { "stars": 473 },
|
||||
"https://github.com/rossrobino/drab": { "stars": 74 },
|
||||
"https://github.com/rossyman/svelte-add-jest": { "stars": 31 },
|
||||
"https://github.com/roxiness/routify": { "stars": 1793 },
|
||||
"https://github.com/rspieker/jest-transform-svelte": { "stars": 35 },
|
||||
"https://github.com/ryan-way-boilerplate/stew": { "stars": 1 },
|
||||
"https://github.com/ryburn52/svelte-typescript-sass-template": { "stars": 16 },
|
||||
"https://github.com/ryu-man/svantic": { "stars": 16 },
|
||||
"https://github.com/saabi/svelte-image-encoder": { "stars": 44 },
|
||||
"https://github.com/samuel-martineau/generator-svelte": { "stars": 29 },
|
||||
"https://github.com/sawyerclick/cmsvelte": { "stars": 23 },
|
||||
"https://github.com/sawyerclick/svelte-lazy-loader": { "stars": 17 },
|
||||
"https://github.com/sbhattarj/full-client-server-sveltekit": { "stars": 4 },
|
||||
"https://github.com/sbhattarj/svelte-zod-form": { "stars": 0 },
|
||||
"https://github.com/sciactive/multicarousel": { "stars": 36 },
|
||||
"https://github.com/scottbedard/svelte-heatmap": { "stars": 136 },
|
||||
"https://github.com/shaozi/svelte-steps": { "stars": 96 },
|
||||
"https://github.com/sharifclick/svelte-swipe": { "stars": 378 },
|
||||
"https://github.com/sharu725/yuyutsu": { "stars": 32 },
|
||||
"https://github.com/shavyg2/slick-for-svelte": { "stars": 24 },
|
||||
"https://github.com/shinnn/gulp-svelte": { "stars": 25 },
|
||||
"https://github.com/shipbit/svane": { "stars": 25 },
|
||||
"https://github.com/shyam-chen/svelte-starter": { "stars": 111 },
|
||||
"https://github.com/sibiraj-s/svelte-tiptap": { "stars": 150 },
|
||||
"https://github.com/silvestrevivo/svelte-marquee": { "stars": 8 },
|
||||
"https://github.com/simeydotme/svelte-range-slider-pips": { "stars": 381 },
|
||||
"https://github.com/simonnepomuk/monorepo": { "stars": 14 },
|
||||
"https://github.com/skayo/svelte-infinite-loading": { "stars": 215 },
|
||||
"https://github.com/skayo/svelte-tiny-virtual-list": { "stars": 337 },
|
||||
"https://github.com/skeletonlabs/skeleton": { "stars": 4038 },
|
||||
"https://github.com/skshahriarahmedraka/vite-svelte-tailwind-template": { "stars": 2 },
|
||||
"https://github.com/soapdog/svelte-template-browserify": { "stars": 6 },
|
||||
"https://github.com/spaceavocado/svelte-form": { "stars": 48 },
|
||||
"https://github.com/spaceavocado/svelte-router": { "stars": 58 },
|
||||
"https://github.com/spaceavocado/svelte-router-template": { "stars": 12 },
|
||||
"https://github.com/specialdoom/proi-ui": { "stars": 144 },
|
||||
"https://github.com/srmullen/svelte-reactive-css-preprocess": { "stars": 63 },
|
||||
"https://github.com/srmullen/svelte-subcomponent-preprocessor": { "stars": 45 },
|
||||
"https://github.com/srmullen/sveltekit-stripe": { "stars": 104 },
|
||||
"https://github.com/ssssota/svelte-exmarkdown": { "stars": 124 },
|
||||
"https://github.com/starptech/sveltejs-brunch": { "stars": 6 },
|
||||
"https://github.com/stephane-vanraes/renderless-svelte": { "stars": 275 },
|
||||
"https://github.com/stephane-vanraes/svelte-multitoneimage": { "stars": 6 },
|
||||
"https://github.com/stephanepericat/svelte-boilerplate": { "stars": 17 },
|
||||
"https://github.com/stevealee/svelte-code-cypress-project": { "stars": 5 },
|
||||
"https://github.com/stordahl/sveltekit-snippets": { "stars": 39 },
|
||||
"https://github.com/storybookjs/storybook": { "stars": 81232 },
|
||||
"https://github.com/supabase-community/svelte-supabase": { "stars": 73 },
|
||||
"https://github.com/supabase/auth-helpers": { "stars": 824 },
|
||||
"https://github.com/svelte-add/3d": { "stars": 6 },
|
||||
"https://github.com/svelte-add/bulma": { "stars": 40 },
|
||||
"https://github.com/svelte-add/coffeescript": { "stars": 14 },
|
||||
"https://github.com/svelte-add/firebase-hosting": { "stars": 7 },
|
||||
"https://github.com/svelte-add/graphql-server": { "stars": 31 },
|
||||
"https://github.com/svelte-add/mdsvex": { "stars": 88 },
|
||||
"https://github.com/svelte-add/postcss": { "stars": 46 },
|
||||
"https://github.com/svelte-add/scss": { "stars": 62 },
|
||||
"https://github.com/svelte-add/tailwindcss": { "stars": 699 },
|
||||
"https://github.com/svelte-add/tauri": { "stars": 20 },
|
||||
"https://github.com/svelte-pilot/svelte-pilot": { "stars": 23 },
|
||||
"https://github.com/svelte-pilot/svelte-pilot-template": { "stars": 53 },
|
||||
"https://github.com/svelte-toolbox/svelte-toolbox": { "stars": 75 },
|
||||
"https://github.com/sveltejs/component-template": { "stars": 546 },
|
||||
"https://github.com/sveltejs/eslint-plugin-svelte": { "stars": 222 },
|
||||
"https://github.com/sveltejs/gestures": { "stars": 86 },
|
||||
"https://github.com/sveltejs/gl": { "stars": 607 },
|
||||
"https://github.com/sveltejs/kit": { "stars": 16743 },
|
||||
"https://github.com/sveltejs/language-tools": { "stars": 1113 },
|
||||
"https://github.com/sveltejs/prettier-plugin-svelte": { "stars": 653 },
|
||||
"https://github.com/sveltejs/rollup-plugin-svelte": { "stars": 484 },
|
||||
"https://github.com/sveltejs/svelte-devtools": { "stars": 1210 },
|
||||
"https://github.com/sveltejs/svelte-loader": { "stars": 586 },
|
||||
"https://github.com/sveltejs/svelte-preprocess": { "stars": 1667 },
|
||||
"https://github.com/sveltejs/svelte-repl": { "stars": 275 },
|
||||
"https://github.com/sveltejs/svelte-scroller": { "stars": 320 },
|
||||
"https://github.com/sveltejs/svelte-subdivide": { "stars": 128 },
|
||||
"https://github.com/sveltejs/svelte-virtual-list": { "stars": 639 },
|
||||
"https://github.com/sveltejs/template": { "stars": 1718 },
|
||||
"https://github.com/sveltejs/template-custom-element": { "stars": 20 },
|
||||
"https://github.com/sveltejs/template-webpack": { "stars": 299 },
|
||||
"https://github.com/sveltejs/vite-plugin-svelte": { "stars": 755 },
|
||||
"https://github.com/svelteness/svelte-jester": { "stars": 125 },
|
||||
"https://github.com/sveltepress/sveltepress": { "stars": 247 },
|
||||
"https://github.com/sveltetools/svelte-asyncable": { "stars": 166 },
|
||||
"https://github.com/sveltetools/svelte-pathfinder": { "stars": 122 },
|
||||
"https://github.com/sveltetools/svelte-viewpoint": { "stars": 36 },
|
||||
"https://github.com/swyxio/swyxkit": { "stars": 647 },
|
||||
"https://github.com/syonip/svelte-cordova": { "stars": 40 },
|
||||
"https://github.com/tanepiper/svelte-formula": { "stars": 125 },
|
||||
"https://github.com/tanstack/query": { "stars": 37505 },
|
||||
"https://github.com/tanstack/table": { "stars": 23066 },
|
||||
"https://github.com/techniq/layerchart": { "stars": 184 },
|
||||
"https://github.com/techniq/svelte-ux": { "stars": 329 },
|
||||
"https://github.com/tehshrike/svelte-state-renderer": { "stars": 35 },
|
||||
"https://github.com/tehshrike/sveltify": { "stars": 35 },
|
||||
"https://github.com/tejasag/sveltetron-9000": { "stars": 39 },
|
||||
"https://github.com/testing-library/svelte-testing-library": { "stars": 577 },
|
||||
"https://github.com/the-homeless-god/sent-template": { "stars": 68 },
|
||||
"https://github.com/the-homeless-god/svelte-item-list": { "stars": 6 },
|
||||
"https://github.com/thecodejack/svelte-dx-table": { "stars": 0 },
|
||||
"https://github.com/thecodejack/svelte-file-dropzone": { "stars": 193 },
|
||||
"https://github.com/thecodejack/svelte-pagination": { "stars": 4 },
|
||||
"https://github.com/thecodejack/svelte-switch": { "stars": 27 },
|
||||
"https://github.com/thelgevold/rules_svelte": { "stars": 19 },
|
||||
"https://github.com/themesberg/flowbite-svelte": { "stars": 1643 },
|
||||
"https://github.com/theovidal/svelteify": { "stars": 48 },
|
||||
"https://github.com/tienpv222/svelte-hash-router": { "stars": 43 },
|
||||
"https://github.com/timhall/svelte-apollo": { "stars": 932 },
|
||||
"https://github.com/timhall/svelte-observable": { "stars": 62 },
|
||||
"https://github.com/timoyo93/svelte-template": { "stars": 0 },
|
||||
"https://github.com/titans-inc/sveltemantic": { "stars": 45 },
|
||||
"https://github.com/tivac/modular-css": { "stars": 279 },
|
||||
"https://github.com/tjinauyeung/svelte-forms-lib": { "stars": 595 },
|
||||
"https://github.com/tolgee/tolgee-js": { "stars": 203 },
|
||||
"https://github.com/tomatrow/sveltekit-adapter-wordpress-shortcode": { "stars": 31 },
|
||||
"https://github.com/tomblachut/svelte-intellij": { "stars": 466 },
|
||||
"https://github.com/tommertom/svelte-ionic-app": { "stars": 650 },
|
||||
"https://github.com/tonyrewin/svelte3-ts-boilerplate": { "stars": 6 },
|
||||
"https://github.com/torstendittmann/svelte-adapter-static-digitalocean": { "stars": 12 },
|
||||
"https://github.com/tropix126/svelte-codesandbox": { "stars": 2 },
|
||||
"https://github.com/tsparticles/svelte": { "stars": 27 },
|
||||
"https://github.com/twicpics/components": { "stars": 48 },
|
||||
"https://github.com/urql-graphql/urql": { "stars": 8273 },
|
||||
"https://github.com/vadimkorr/svelte-carousel": { "stars": 250 },
|
||||
"https://github.com/vaheqelyan/svelte-grid": { "stars": 906 },
|
||||
"https://github.com/vaheqelyan/svelte-popover": { "stars": 57 },
|
||||
"https://github.com/valentinh/svelte-easy-crop": { "stars": 170 },
|
||||
"https://github.com/vhscom/svelte-headlessui-starter": { "stars": 48 },
|
||||
"https://github.com/vikignt/svelte-mui": { "stars": 313 },
|
||||
"https://github.com/vime-js/vime": { "stars": 2674 },
|
||||
"https://github.com/vinayakkulkarni/s-offline": { "stars": 65 },
|
||||
"https://github.com/vinodnimbalkar/svelte-pdf": { "stars": 182 },
|
||||
"https://github.com/vkurko/calendar": { "stars": 668 },
|
||||
"https://github.com/vkurko/svelte-store2": { "stars": 4 },
|
||||
"https://github.com/vontigo/vontigo": { "stars": 118 },
|
||||
"https://github.com/vuesomedev/todomvc-svelte": { "stars": 39 },
|
||||
"https://github.com/wd-david/svelte-hover-draw-svg": { "stars": 24 },
|
||||
"https://github.com/wearegenki/minna-ui": { "stars": 87 },
|
||||
"https://github.com/will-wow/svelte-typescript-template": { "stars": 5 },
|
||||
"https://github.com/xelaok/svelte-media-query": { "stars": 52 },
|
||||
"https://github.com/xelaok/svelte-mobx": { "stars": 44 },
|
||||
"https://github.com/xnimorz/svelte-input-mask": { "stars": 101 },
|
||||
"https://github.com/yazonnile/svelidation": { "stars": 51 },
|
||||
"https://github.com/yellowinq/svelte-pin-input": { "stars": 0 },
|
||||
"https://github.com/yesvelte/yesvelte": { "stars": 172 },
|
||||
"https://github.com/yoglib/svelte-component-template": { "stars": 345 },
|
||||
"https://github.com/yoglib/svelte-fullcalendar": { "stars": 195 },
|
||||
"https://github.com/zerodevx/svelte-toast": { "stars": 709 },
|
||||
"https://github.com/zooplus/zoo-web-components": { "stars": 45 }
|
||||
}
|
||||
5
src/lib/data/gitlab.json
Normal file
5
src/lib/data/gitlab.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"https://gitlab.com/az67128/svelte-atoms": { "stars": 17 },
|
||||
"https://gitlab.com/davidhund/svelte-carbonbadge": { "stars": 0 },
|
||||
"https://gitlab.com/public-e-soa-com/svelte-time-picker": { "stars": 4 }
|
||||
}
|
||||
@@ -1,481 +0,0 @@
|
||||
{
|
||||
"github": {
|
||||
"6edesign/svelte-calendar": 527,
|
||||
"aantusahaa/svelte-remixicon": 36,
|
||||
"abaga129/sveltekit-adapter-iis": 2,
|
||||
"abosch19/svelte-fast-marquee": 29,
|
||||
"agnosticui/agnosticui": 684,
|
||||
"agusid/boilerplate-svelte": 60,
|
||||
"agustinl/svelte-tags-input": 281,
|
||||
"alessiogr/sveltekit-windicss-flowbite-template": 3,
|
||||
"alexprey/sveltedoc-parser": 90,
|
||||
"alexxnb/aovi-svelte": 11,
|
||||
"alexxnb/svate": 14,
|
||||
"alexxnb/svelte-chota": 290,
|
||||
"alexxnb/svelte-eventbus": 38,
|
||||
"alexxnb/svelte-preprocess-markdown": 134,
|
||||
"alexxnb/tinro": 671,
|
||||
"alphapeter/fa-svelte": 72,
|
||||
"andrelmlins/svelte-fullscreen": 61,
|
||||
"andrelmlins/svelte-grid-responsive": 51,
|
||||
"andrelmlins/svelte-infinite-scroll": 262,
|
||||
"ankurrsinghal/svelte-legos": 641,
|
||||
"anotherempty/svelte-brick-gallery": 36,
|
||||
"antony/svelte-box": 61,
|
||||
"antony/sveltekit-adapter-browser-extension": 158,
|
||||
"any-tdf/stdf": 511,
|
||||
"appwrite/sdk-for-svelte": 74,
|
||||
"architect/sveltekit-adapter": 9,
|
||||
"arlac77/svelte-websocket-store": 275,
|
||||
"arthurgermano/svelte-client-router": 14,
|
||||
"axelen123/svelte-ts-template": 21,
|
||||
"ayndqy/svelte-micro": 88,
|
||||
"babichjacob/university-website": 1,
|
||||
"bartektelec/svelte-svg-transform": 21,
|
||||
"baseballyama/svelte-preprocess-delegate-events": 42,
|
||||
"beartocode/mismerge": 21,
|
||||
"beerui/beerui": 68,
|
||||
"benjazehr/svelte-example-museums": 29,
|
||||
"bernhardwebstudio/svelte-virtual-table": 19,
|
||||
"bestguy/sveltestrap": 1290,
|
||||
"beyonk-group/gdpr-cookie-consent-banner": 228,
|
||||
"beyonk-group/svelte-carousel": 213,
|
||||
"beyonk-group/svelte-facebook-customer-chat": 6,
|
||||
"beyonk-group/svelte-facebook-pixel": 16,
|
||||
"beyonk-group/svelte-google-analytics": 75,
|
||||
"beyonk-group/svelte-googlemaps": 70,
|
||||
"beyonk-group/svelte-mapbox": 323,
|
||||
"beyonk-group/svelte-notifications": 309,
|
||||
"beyonk-group/svelte-scrollspy": 37,
|
||||
"beyonk-group/svelte-simple-icons": 13,
|
||||
"beyonk-group/svelte-trustpilot": 4,
|
||||
"bholmesdev/svelte-starter-template": 43,
|
||||
"blade67/sveltron": 64,
|
||||
"bluwy/svelte-router": 31,
|
||||
"bohnacker/svelte-number-spinner": 24,
|
||||
"bonosoft/sveltekit-codeentry": 0,
|
||||
"bonosoft/sveltekit-progress": 0,
|
||||
"bonosoft/sveltekit-qrcode": 3,
|
||||
"born05/sveltekit-proxy": 2,
|
||||
"brandonxiang/svelte-webpack-mpa": 23,
|
||||
"brunomolteni/svelte-sortable-list": 121,
|
||||
"bsssshhhhhhh/svelte-data-grid": 199,
|
||||
"budgetdraw/sveltekit-cloudflare-adapter": 7,
|
||||
"buhrmi/query-store": 44,
|
||||
"c0bra/svelma": 531,
|
||||
"captaincodeman/svelte-headlessui": 458,
|
||||
"carbon-design-system/carbon-components-svelte": 2538,
|
||||
"carlosv2/adapter-node-ws": 16,
|
||||
"casual-ui/casual-ui": 51,
|
||||
"cerebral/overmind": 1558,
|
||||
"chadulous/svodals": 1,
|
||||
"chainlist/svelte-forms": 406,
|
||||
"chanced/filedrop-svelte": 106,
|
||||
"chanced/focus-svelte": 27,
|
||||
"charlyjazz/svelte-credit-card": 49,
|
||||
"chuanqisun/svelte-electron-template": 12,
|
||||
"cibernox/svelte-intl-precompile": 265,
|
||||
"ciscoheat/sveltekit-superforms": 1510,
|
||||
"coc-extensions/coc-svelte": 175,
|
||||
"codediodeio/sveltefire": 1496,
|
||||
"colinbate/svelte-ts-tailwind-template": 69,
|
||||
"collardeau/svelte-headroom": 76,
|
||||
"consoletvs/sswr": 205,
|
||||
"corneliusio/svelte-sublime": 57,
|
||||
"cweili/svelte-fa": 360,
|
||||
"dafn/svelte-typescript-parcel": 51,
|
||||
"dafn/svelte-typescript-rollup": 78,
|
||||
"dasdaniel/svelte-table": 465,
|
||||
"daybrush/moveable": 9058,
|
||||
"daybrush/ruler": 274,
|
||||
"daybrush/selecto": 1814,
|
||||
"demoorjasper/parcel-plugin-svelte": 235,
|
||||
"devghost/svelte": 7,
|
||||
"devshamim/svelte-unicons": 2,
|
||||
"dhyeymoliya/svelte-form-validation": 2,
|
||||
"dmitrykurmanov/waxwing-rating": 6,
|
||||
"dmvvilela/svelte-scrollactive": 4,
|
||||
"dopry/svelte-auth0": 72,
|
||||
"dyalicode/svelte-formly": 245,
|
||||
"dylanblokhuis/svelte-feather-icons": 129,
|
||||
"easylogic/svelte-summernote": 11,
|
||||
"efeskucuk/svelte-color-picker": 100,
|
||||
"ekhaled/svelte-dev-helper": 6,
|
||||
"elsonigo/svelte-ie11": 3,
|
||||
"emh333/esbuild-svelte": 220,
|
||||
"emiltholin/svelte-routing": 1934,
|
||||
"emrekara37/svelte-rate-it": 39,
|
||||
"endenwer/svelte-restate": 21,
|
||||
"equipmentshare/date-range-input": 15,
|
||||
"erokar/svelte-stopwatch": 1,
|
||||
"esinx/svelte-tree": 22,
|
||||
"ethercorps/svedev": 7,
|
||||
"evanleck/vim-svelte": 297,
|
||||
"farhan2106/svelte-typescript": 36,
|
||||
"farhan2106/svelte-typescript-ssr": 9,
|
||||
"fede-rodes/hardhat-svelte-boilerplate": 1,
|
||||
"flekschas/svelte-simple-modal": 414,
|
||||
"fmaclen/svelte-currency-input": 22,
|
||||
"fusioncharts/svelte-fusioncharts": 126,
|
||||
"fxbois/web-mode": 1604,
|
||||
"gcbenlloch/svelte-cleavejs": 7,
|
||||
"geakstr/svelte-3-rollup-typescript-vscode": 38,
|
||||
"geoffcox/sterling-svelte": 3,
|
||||
"geoffrich/svelte-adapter-azure-swa": 109,
|
||||
"getsentry/sentry-javascript": 7425,
|
||||
"gitbreaker222/svelte-virtual-list": 19,
|
||||
"gitbreaker222/sveltestore": 1,
|
||||
"gornostay25/svelte-adapter-bun": 433,
|
||||
"guyromm/svelte-postgrest-template": 52,
|
||||
"gyurielf/svelte-tel-input": 68,
|
||||
"halfdanj/svelte-adapter-appengine": 58,
|
||||
"halfdanj/svelte-google-auth": 40,
|
||||
"halfnelson/svelte-native": 1622,
|
||||
"hedgehog125/sveltekit-adapter-versioned-worker": 6,
|
||||
"hellbutcher/parcel-transformer-svelte3-plus": 5,
|
||||
"himynameisdave/svelte-copyright": 15,
|
||||
"himynameisdave/svelte-flex": 72,
|
||||
"himynameisdave/svelte-frappe-charts": 297,
|
||||
"histoire-dev/histoire": 2867,
|
||||
"hperrin/svelte-material-ui": 3205,
|
||||
"huntabyte/shadcn-svelte": 2273,
|
||||
"idleberg/sveltekit-adapter-html-like": 17,
|
||||
"idris-maps/svelte-parts": 46,
|
||||
"ikun-svelte/ikun-ui": 1103,
|
||||
"illright/attractions": 970,
|
||||
"importantimport/urara": 508,
|
||||
"introvertuous/svelte-icons": 280,
|
||||
"italypaleale/svelte-spa-router": 1428,
|
||||
"itswadesh/svelte-commerce": 1321,
|
||||
"ivanhofer/sthemer": 27,
|
||||
"ivanhofer/typesafe-i18n": 1954,
|
||||
"ivanhofer/typesafe-i18n-demo-sveltekit": 110,
|
||||
"j2l/walk-and-graph-svelte-components": 10,
|
||||
"jacobmischka/svelte-flatpickr": 153,
|
||||
"jacwright/svelte-navaid": 17,
|
||||
"jamen/svelte-router": 7,
|
||||
"janosh/svelte-bricks": 75,
|
||||
"janosh/svelte-multiselect": 239,
|
||||
"janosh/svelte-toc": 89,
|
||||
"jasongitmail/super-sitemap": 59,
|
||||
"jerriclynsjohn/svelte-storybook-tailwind": 306,
|
||||
"jiangfengming/svelte-preprocess-css-hash": 8,
|
||||
"jiangfengming/svelte-preprocess-html-asset": 3,
|
||||
"jikkai/svelte-router": 62,
|
||||
"jill64/svelte-inline-modal": 3,
|
||||
"jill64/sveltekit-adapter-aws": 3,
|
||||
"jimutt/svelte-pick-a-place": 54,
|
||||
"joaquimnetocel/svelte-datatables-net": 24,
|
||||
"joeinnes/svelte-image": 3,
|
||||
"joemmalatesta/sveltekit-pwa-guide": 0,
|
||||
"john--kane/svelteml": 72,
|
||||
"johnwalley/compare-image-slider": 16,
|
||||
"jorgegorka/svelte-firebase": 228,
|
||||
"jorgegorka/svelte-router": 497,
|
||||
"jthegedus/svelte-adapter-firebase": 277,
|
||||
"juliuslipp/sveltekit-shadcn-ai": 3,
|
||||
"justinekizhak/svelte-tailwind-template": 2,
|
||||
"jycouet/kitql": 349,
|
||||
"k-sato1995/sveltekit-blog-template": 27,
|
||||
"kaisermann/svelte-css-vars": 234,
|
||||
"kaisermann/svelte-i18n": 1105,
|
||||
"kaisermann/svelte-loadable": 319,
|
||||
"kaladivo/svelte-kit-koa-boilerplate": 3,
|
||||
"kazzkiq/svero": 203,
|
||||
"kbrgl/svelte-french-toast": 657,
|
||||
"keenethics/svelte-notifications": 586,
|
||||
"kenkunz/svelte-fsm": 264,
|
||||
"kenoxa/svelte-fragment-component": 4,
|
||||
"kenoxa/svelte-htm": 21,
|
||||
"kenoxa/svelte-jsx": 33,
|
||||
"kevmodrome/svelte-favicon-badge": 101,
|
||||
"kevmodrome/svelte-preprocessor-fetch": 50,
|
||||
"kindoflew/svelte-parallax": 136,
|
||||
"kokizzu/svelte-mpa": 75,
|
||||
"koljal/sk-authjs": 1,
|
||||
"kolodziejczak-sz/svelte-redux-connect": 17,
|
||||
"korywka/svelte-slider": 12,
|
||||
"ktsn/svelte-jest": 37,
|
||||
"kwchang0831/svelte-qwer": 390,
|
||||
"l-portet/svelte-switch-case": 136,
|
||||
"laosb/sveltenova": 20,
|
||||
"leafoftree/vim-svelte-plugin": 125,
|
||||
"lemmon/tablog-svelte": 25,
|
||||
"leodog896/svelte-reparent": 7,
|
||||
"leshak/svelte-icons-pack": 47,
|
||||
"lightning-jar/svelte-typescript-tailwind-pug-starter": 10,
|
||||
"liyuanqiu/echarts-for-svelte": 25,
|
||||
"lottiefiles/svelte-lottie-player": 117,
|
||||
"lpshanley/svelte-phonegap": 9,
|
||||
"ls-age/svelte-preprocess-less": 13,
|
||||
"ls-age/svelte-preprocess-sass": 92,
|
||||
"lucia-auth/lucia": 4478,
|
||||
"lucide-icons/lucide": 6809,
|
||||
"lukeed/pwa": 3120,
|
||||
"lunatk/svelte-web-component-builder": 4,
|
||||
"macfja/svelte-adapter-multi": 16,
|
||||
"macfja/svelte-adapter-neutralino": 14,
|
||||
"macfja/svelte-expirable": 3,
|
||||
"macfja/svelte-invalidable": 5,
|
||||
"macfja/svelte-oauth2": 37,
|
||||
"macfja/svelte-persistent-store": 220,
|
||||
"macfja/svelte-scroll-video": 1,
|
||||
"macfja/svelte-undoable": 44,
|
||||
"maciekgrzybek/svelte-inview": 639,
|
||||
"mailcheck-co/mailcheck.site": 10,
|
||||
"malynium/svelte-adapter-github": 41,
|
||||
"marcograhl/tailwindcss-svelte-starter": 115,
|
||||
"markoboy/svelte-webpack-babel-scss": 7,
|
||||
"mattjennings/svelte-modals": 139,
|
||||
"matyunya/smelte": 1512,
|
||||
"matyunya/svelte-image": 716,
|
||||
"matyunya/svelte-waypoint": 83,
|
||||
"mawa-ai/chat-embed": 0,
|
||||
"mdauner/sveltejs-forms": 197,
|
||||
"mefechoel/svelte-navigator": 485,
|
||||
"melt-ui/melt-ui": 2128,
|
||||
"meteor-svelte/meteor-svelte": 113,
|
||||
"metonym/svelte-pincode": 20,
|
||||
"mhkeller/layercake": 1041,
|
||||
"microsoft/fast": 8759,
|
||||
"milahu/svelte-preval": 10,
|
||||
"mskocik/svelecte": 371,
|
||||
"mskocik/svelty-picker": 156,
|
||||
"muhajirdev/svelte-tailwind-template": 89,
|
||||
"mvasigh/sveltekit-mdsvex-blog": 146,
|
||||
"n00nday/stwui": 375,
|
||||
"n0th1ng-else/svelte-typescript-sass": 11,
|
||||
"n3-rd/curseur": 5,
|
||||
"naver/egjs-flicking": 2554,
|
||||
"naver/egjs-infinitegrid": 1770,
|
||||
"navneetsharmaui/sveltekit-blog": 176,
|
||||
"navneetsharmaui/sveltekit-starter": 568,
|
||||
"nazimhali/svelte-template": 4,
|
||||
"nbgoodall/leblog": 1,
|
||||
"neighbourhoodie/svelte-pouchdb-couchdb": 62,
|
||||
"nerd-coder/svelte-zod-form": 7,
|
||||
"nguyentuansi/openai-quickstart-sveltekit": 6,
|
||||
"nickyhajal/svelte-tabs": 92,
|
||||
"noelmugnier/svelte-translate": 10,
|
||||
"nomangul/svelte-page-progress": 17,
|
||||
"noney1412/svelte-exstore": 0,
|
||||
"novacbn/kahi-ui": 189,
|
||||
"nstuyvesant/sveltekit-auth-example": 267,
|
||||
"ntsd/svelte-tex": 6,
|
||||
"ntsd/sveltekit-html-minifier": 4,
|
||||
"nubolab-ffwd/svelte-fluent": 71,
|
||||
"nye/svelte-electron-better-sqlite3-starter": 20,
|
||||
"okrad/svelte-progressbar": 128,
|
||||
"oli8/spaper": 191,
|
||||
"openfrenchfries/supasveltekit": 24,
|
||||
"ordinaryjellyfish/svelte-routing-template": 15,
|
||||
"oskar-gmerek/surreal-sveltekit": 12,
|
||||
"oslabs-beta/svault": 67,
|
||||
"ottomated/trpc-svelte-query": 45,
|
||||
"pablo-abc/felte": 925,
|
||||
"pablo-abc/svelte-markdown": 275,
|
||||
"pankod/svelte-boilerplate": 289,
|
||||
"panya/svelte-intl": 49,
|
||||
"paoloricciuti/sveltekit-search-params": 339,
|
||||
"paolotiu/svelte-boring-avatars": 48,
|
||||
"pateketrueke/svql": 61,
|
||||
"pateketrueke/yrv": 162,
|
||||
"patoi/svelte-component-library-template": 67,
|
||||
"patrickg/html-svelte-parser": 12,
|
||||
"paulmaly/svelte-content-loader": 157,
|
||||
"paulmaly/svelte-image-compare": 20,
|
||||
"paulmaly/svelte-imask": 65,
|
||||
"paulmaly/svelte-page-router": 21,
|
||||
"paulmaly/svelte-ticker": 18,
|
||||
"pavish/select-madu": 51,
|
||||
"pbastowski/svelte-poi-starter": 10,
|
||||
"pearofducks/svelte-match-media": 38,
|
||||
"perfect-things/ui": 13,
|
||||
"pilcrowonpaper/monaco": 25,
|
||||
"pixievoltno1/svelte-webext-storage-adapter": 24,
|
||||
"pixievoltno1/svelte-writable-derived": 83,
|
||||
"plihelix/wails-template-sveltekit": 36,
|
||||
"plrenaudin/svelte-storez": 26,
|
||||
"pluvial/svelte-adapter-deno": 299,
|
||||
"pngwn/mdsvex": 2056,
|
||||
"pngwn/svelte-adapter": 286,
|
||||
"pngwn/svelte-test": 25,
|
||||
"posandu/svelte-ripple-action": 42,
|
||||
"pragmatic-engineering/svelte-form-builder-community": 50,
|
||||
"prgm-dev/sveltekit-progress-bar": 11,
|
||||
"probablykasper/date-picker-svelte": 253,
|
||||
"probablykasper/svelte-droplet": 24,
|
||||
"proverbial-ninja/vscode-svelte-component-extractor": 28,
|
||||
"pstanoev/simple-svelte-autocomplete": 431,
|
||||
"ptkdev/sveltekit-cordova-adapter": 38,
|
||||
"ptkdev/sveltekit-electron-adapter": 59,
|
||||
"pyoner/svelte-typescript": 210,
|
||||
"qutran/svelte-inspector": 83,
|
||||
"qutran/swheel": 43,
|
||||
"radar-azdelta/svelte-datatable": 0,
|
||||
"radix-svelte/radix-svelte": 468,
|
||||
"reecelucas/svelte-accessible-dialog": 26,
|
||||
"rezi/svelte-gestures": 95,
|
||||
"rgossiaux/svelte-headlessui": 1698,
|
||||
"ricalamino/svelte-firebase-auth": 51,
|
||||
"rich-harris/pancake": 1239,
|
||||
"rich-harris/svelte-template-electron": 89,
|
||||
"rixo/rollup-plugin-svelte-hot": 48,
|
||||
"rixo/svelte-template-hot": 60,
|
||||
"rob-balfre/svelte-select": 1171,
|
||||
"robbrazier/svelte-awesome": 473,
|
||||
"rossrobino/drab": 74,
|
||||
"rossyman/svelte-add-jest": 31,
|
||||
"roxiness/routify": 1793,
|
||||
"rspieker/jest-transform-svelte": 35,
|
||||
"ryan-way-boilerplate/stew": 1,
|
||||
"ryburn52/svelte-typescript-sass-template": 16,
|
||||
"ryu-man/svantic": 16,
|
||||
"saabi/svelte-image-encoder": 44,
|
||||
"samuel-martineau/generator-svelte": 29,
|
||||
"sawyerclick/cmsvelte": 23,
|
||||
"sawyerclick/svelte-lazy-loader": 17,
|
||||
"sbhattarj/full-client-server-sveltekit": 4,
|
||||
"sbhattarj/svelte-zod-form": 0,
|
||||
"sciactive/multicarousel": 36,
|
||||
"scottbedard/svelte-heatmap": 136,
|
||||
"shaozi/svelte-steps": 96,
|
||||
"sharifclick/svelte-swipe": 378,
|
||||
"sharu725/yuyutsu": 32,
|
||||
"shavyg2/slick-for-svelte": 24,
|
||||
"shinnn/gulp-svelte": 25,
|
||||
"shipbit/svane": 25,
|
||||
"shyam-chen/svelte-starter": 111,
|
||||
"sibiraj-s/svelte-tiptap": 150,
|
||||
"silvestrevivo/svelte-marquee": 8,
|
||||
"simeydotme/svelte-range-slider-pips": 381,
|
||||
"simonnepomuk/monorepo": 14,
|
||||
"skayo/svelte-infinite-loading": 214,
|
||||
"skayo/svelte-tiny-virtual-list": 337,
|
||||
"skeletonlabs/skeleton": 4038,
|
||||
"skshahriarahmedraka/vite-svelte-tailwind-template": 2,
|
||||
"soapdog/svelte-template-browserify": 6,
|
||||
"spaceavocado/svelte-form": 48,
|
||||
"spaceavocado/svelte-router": 58,
|
||||
"spaceavocado/svelte-router-template": 12,
|
||||
"specialdoom/proi-ui": 144,
|
||||
"srmullen/svelte-reactive-css-preprocess": 63,
|
||||
"srmullen/svelte-subcomponent-preprocessor": 45,
|
||||
"srmullen/sveltekit-stripe": 104,
|
||||
"ssssota/svelte-exmarkdown": 124,
|
||||
"starptech/sveltejs-brunch": 6,
|
||||
"stephane-vanraes/renderless-svelte": 275,
|
||||
"stephane-vanraes/svelte-multitoneimage": 6,
|
||||
"stephanepericat/svelte-boilerplate": 17,
|
||||
"stevealee/svelte-code-cypress-project": 5,
|
||||
"stordahl/sveltekit-snippets": 39,
|
||||
"storybookjs/storybook": 81232,
|
||||
"supabase-community/svelte-supabase": 73,
|
||||
"supabase/auth-helpers": 824,
|
||||
"svelte-add/3d": 6,
|
||||
"svelte-add/bulma": 40,
|
||||
"svelte-add/coffeescript": 14,
|
||||
"svelte-add/firebase-hosting": 7,
|
||||
"svelte-add/graphql-server": 31,
|
||||
"svelte-add/mdsvex": 88,
|
||||
"svelte-add/postcss": 46,
|
||||
"svelte-add/scss": 62,
|
||||
"svelte-add/tailwindcss": 699,
|
||||
"svelte-add/tauri": 20,
|
||||
"svelte-pilot/svelte-pilot": 23,
|
||||
"svelte-pilot/svelte-pilot-template": 53,
|
||||
"svelte-toolbox/svelte-toolbox": 75,
|
||||
"sveltejs/component-template": 546,
|
||||
"sveltejs/eslint-plugin-svelte": 222,
|
||||
"sveltejs/gestures": 86,
|
||||
"sveltejs/gl": 607,
|
||||
"sveltejs/kit": 16743,
|
||||
"sveltejs/language-tools": 1112,
|
||||
"sveltejs/prettier-plugin-svelte": 653,
|
||||
"sveltejs/rollup-plugin-svelte": 484,
|
||||
"sveltejs/svelte-devtools": 1210,
|
||||
"sveltejs/svelte-loader": 586,
|
||||
"sveltejs/svelte-preprocess": 1667,
|
||||
"sveltejs/svelte-repl": 275,
|
||||
"sveltejs/svelte-scroller": 320,
|
||||
"sveltejs/svelte-subdivide": 128,
|
||||
"sveltejs/svelte-virtual-list": 639,
|
||||
"sveltejs/template": 1718,
|
||||
"sveltejs/template-custom-element": 20,
|
||||
"sveltejs/template-webpack": 299,
|
||||
"sveltejs/vite-plugin-svelte": 755,
|
||||
"svelteness/svelte-jester": 125,
|
||||
"sveltepress/sveltepress": 246,
|
||||
"sveltetools/svelte-asyncable": 166,
|
||||
"sveltetools/svelte-pathfinder": 122,
|
||||
"sveltetools/svelte-viewpoint": 36,
|
||||
"swyxio/swyxkit": 647,
|
||||
"syonip/svelte-cordova": 40,
|
||||
"tanepiper/svelte-formula": 125,
|
||||
"tanstack/query": 37504,
|
||||
"tanstack/table": 23066,
|
||||
"techniq/layerchart": 184,
|
||||
"techniq/svelte-ux": 329,
|
||||
"tehshrike/svelte-state-renderer": 35,
|
||||
"tehshrike/sveltify": 35,
|
||||
"tejasag/sveltetron-9000": 39,
|
||||
"testing-library/svelte-testing-library": 577,
|
||||
"the-homeless-god/sent-template": 68,
|
||||
"the-homeless-god/svelte-item-list": 6,
|
||||
"thecodejack/svelte-dx-table": 0,
|
||||
"thecodejack/svelte-file-dropzone": 193,
|
||||
"thecodejack/svelte-pagination": 4,
|
||||
"thecodejack/svelte-switch": 27,
|
||||
"thelgevold/rules_svelte": 19,
|
||||
"themesberg/flowbite-svelte": 1642,
|
||||
"theovidal/svelteify": 48,
|
||||
"tienpv222/svelte-hash-router": 43,
|
||||
"timhall/svelte-apollo": 932,
|
||||
"timhall/svelte-observable": 62,
|
||||
"timoyo93/svelte-template": 0,
|
||||
"titans-inc/sveltemantic": 45,
|
||||
"tivac/modular-css": 279,
|
||||
"tjinauyeung/svelte-forms-lib": 595,
|
||||
"tolgee/tolgee-js": 203,
|
||||
"tomatrow/sveltekit-adapter-wordpress-shortcode": 31,
|
||||
"tomblachut/svelte-intellij": 466,
|
||||
"tommertom/svelte-ionic-app": 650,
|
||||
"tonyrewin/svelte3-ts-boilerplate": 6,
|
||||
"torstendittmann/svelte-adapter-static-digitalocean": 12,
|
||||
"tropix126/svelte-codesandbox": 2,
|
||||
"tsparticles/svelte": 27,
|
||||
"twicpics/components": 48,
|
||||
"urql-graphql/urql": 8273,
|
||||
"vadimkorr/svelte-carousel": 250,
|
||||
"vaheqelyan/svelte-grid": 906,
|
||||
"vaheqelyan/svelte-popover": 57,
|
||||
"valentinh/svelte-easy-crop": 170,
|
||||
"vhscom/svelte-headlessui-starter": 48,
|
||||
"vikignt/svelte-mui": 313,
|
||||
"vime-js/vime": 2674,
|
||||
"vinayakkulkarni/s-offline": 65,
|
||||
"vinodnimbalkar/svelte-pdf": 182,
|
||||
"vkurko/calendar": 668,
|
||||
"vkurko/svelte-store2": 4,
|
||||
"vontigo/vontigo": 118,
|
||||
"vuesomedev/todomvc-svelte": 39,
|
||||
"wd-david/svelte-hover-draw-svg": 24,
|
||||
"wearegenki/minna-ui": 87,
|
||||
"will-wow/svelte-typescript-template": 5,
|
||||
"xelaok/svelte-media-query": 52,
|
||||
"xelaok/svelte-mobx": 44,
|
||||
"xnimorz/svelte-input-mask": 101,
|
||||
"yazonnile/svelidation": 51,
|
||||
"yellowinq/svelte-pin-input": 0,
|
||||
"yesvelte/yesvelte": 172,
|
||||
"yoglib/svelte-component-template": 345,
|
||||
"yoglib/svelte-fullcalendar": 195,
|
||||
"zerodevx/svelte-toast": 709,
|
||||
"zooplus/zoo-web-components": 45
|
||||
},
|
||||
"gitlab": {
|
||||
"az67128/svelte-atoms": 17,
|
||||
"davidhund/svelte-carbonbadge": 0,
|
||||
"public-e-soa-com/svelte-time-picker": 4
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,32 @@
|
||||
import github from '$lib/data/github.json';
|
||||
import gitlab from '$lib/data/gitlab.json';
|
||||
import npm from '$lib/data/npm.json';
|
||||
import publint from '$lib/data/publint.json';
|
||||
import type { z } from 'zod';
|
||||
import type { componentsSchema } from '$lib/schemas';
|
||||
|
||||
export const injectNpmData = (input: z.infer<typeof componentsSchema>) => {
|
||||
export const injectData = (input: z.infer<typeof componentsSchema>) => {
|
||||
const output = [];
|
||||
for (const item of input) {
|
||||
const extra = npm[item.npm] ?? {};
|
||||
output.push({ ...item, ...extra });
|
||||
}
|
||||
return output;
|
||||
};
|
||||
// Github
|
||||
const githubIndex = Object.keys(github).find((key) =>
|
||||
item.repository.toLowerCase().includes(key)
|
||||
);
|
||||
const githubExtra = github[githubIndex] ?? {};
|
||||
|
||||
export const injectPublintData = (input: z.infer<typeof componentsSchema>) => {
|
||||
const output = [];
|
||||
for (const item of input) {
|
||||
const extra = publint[item.npm] ?? {};
|
||||
output.push({ ...item, ...extra });
|
||||
// Gitlab
|
||||
const gitlabIndex = Object.keys(gitlab).find((key) =>
|
||||
item.repository.toLowerCase().includes(key)
|
||||
);
|
||||
const gitlabExtra = gitlab[gitlabIndex] ?? {};
|
||||
|
||||
// NPM
|
||||
const npmExtra = npm[item.npm] ?? {};
|
||||
|
||||
// Publint
|
||||
const publintExtra = publint[item.npm] ?? {};
|
||||
|
||||
output.push({ ...item, ...githubExtra, ...gitlabExtra, ...npmExtra, ...publintExtra });
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
import stars from '$lib/data/stars.json';
|
||||
|
||||
type RepoInfo = {
|
||||
type: 'Github' | 'Gitlab';
|
||||
identifier: string;
|
||||
};
|
||||
|
||||
const githubNameRegexp = new RegExp(
|
||||
'https://github.com/([a-zA-Z0-9][a-zA-Z0-9-]{0,38}/[a-zA-Z0-9._-]{1,100})'
|
||||
);
|
||||
const gitlabNameRegExp = new RegExp('https://gitlab.com/([\\w-]+/[\\w-]+)');
|
||||
|
||||
export function getStarsCount(repositoryUrl: string): number | undefined {
|
||||
const repoInfo = getType(repositoryUrl);
|
||||
if (repoInfo === null) {
|
||||
return undefined;
|
||||
}
|
||||
return stars[repoInfo.type === 'Gitlab' ? 'gitlab' : 'github'][repoInfo.identifier] ?? undefined;
|
||||
}
|
||||
|
||||
function getType(repositoryUrl: string): RepoInfo | null {
|
||||
if (githubNameRegexp.test(repositoryUrl)) {
|
||||
const identifier = repositoryUrl.match(githubNameRegexp)[1].toLowerCase();
|
||||
return {
|
||||
type: 'Github',
|
||||
identifier
|
||||
};
|
||||
}
|
||||
if (gitlabNameRegExp.test(repositoryUrl)) {
|
||||
const identifier = repositoryUrl.match(gitlabNameRegExp)[1].toLowerCase();
|
||||
return {
|
||||
type: 'Gitlab',
|
||||
identifier
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function injectStars<T extends { repository?: string; url?: string; stars?: number }>(
|
||||
data: Array<T>
|
||||
): Array<T> {
|
||||
data.forEach((item) => (item.stars = getStarsCount(item.repository ?? item.url ?? '')));
|
||||
return data;
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
<script lang="ts">
|
||||
import components from './components.json';
|
||||
import SearchableJson from '$lib/SearchableJson.svelte';
|
||||
import { injectNpmData } from '$utils/injectData';
|
||||
import { injectStars } from '$utils/stars';
|
||||
import { injectData } from '$utils/injectData';
|
||||
</script>
|
||||
|
||||
<SearchableJson
|
||||
data={injectNpmData(injectStars(components))}
|
||||
data={injectData(components)}
|
||||
displayTitle="Components"
|
||||
displayTitleSingular="component"
|
||||
submittingType="component"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import templates from './templates.json';
|
||||
import SearchableJson from '$lib/SearchableJson.svelte';
|
||||
import { injectStars } from '$utils/stars';
|
||||
import { injectData } from '$utils/injectData';
|
||||
</script>
|
||||
|
||||
<SearchableJson
|
||||
data={injectStars(templates)}
|
||||
data={injectData(templates)}
|
||||
displayTitle="Template"
|
||||
displayTitleSingular="template"
|
||||
submittingType="template"
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<script lang="ts">
|
||||
import tools from '../tools/tools.json';
|
||||
import SearchableJson from '$lib/SearchableJson.svelte';
|
||||
import { injectNpmData } from '$utils/injectData';
|
||||
import { injectStars } from '$utils/stars';
|
||||
import { injectData } from '$utils/injectData';
|
||||
</script>
|
||||
|
||||
<SearchableJson
|
||||
data={injectNpmData(injectStars(tools))}
|
||||
data={injectData(tools)}
|
||||
displayTitle="Tools"
|
||||
displayTitleSingular="tool"
|
||||
submittingType="tool"
|
||||
|
||||
Reference in New Issue
Block a user