20 lines
385 B
TypeScript
20 lines
385 B
TypeScript
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
|
|
const reposPath = path.join(process.cwd(), 'starred-repos.json');
|
|
|
|
const reposData = fs.readFileSync(reposPath, 'utf-8');
|
|
|
|
export const repos = JSON.parse(reposData) as Repo[];
|
|
|
|
export type Repo = {
|
|
id: number;
|
|
name: string;
|
|
description: string;
|
|
author: string;
|
|
stars: number;
|
|
lastUpdated: string;
|
|
url: string;
|
|
}
|
|
|