diff --git a/docs/.vitepress/data/packageData.json b/docs/.vitepress/data/packageData.json index 2e9bc22e9e4..613ed60e793 100644 --- a/docs/.vitepress/data/packageData.json +++ b/docs/.vitepress/data/packageData.json @@ -158,16 +158,5 @@ "href": "https://www.npmjs.com/package/lucide-static" } ] - }, - "lucide-flutter": { - "order": 9, - "icon": "flutter", - "shields": [ - { - "alt": "flutter", - "src": "https://img.shields.io/pub/v/lucide_icons", - "href": "https://img.shields.io/pub/v/lucide_icons" - } - ] } } diff --git a/docs/.vitepress/lib/fetchPackages.ts b/docs/.vitepress/lib/fetchPackages.ts index 9f6796547e7..aede2783964 100644 --- a/docs/.vitepress/lib/fetchPackages.ts +++ b/docs/.vitepress/lib/fetchPackages.ts @@ -1,6 +1,5 @@ import { promises as fs, constants } from 'fs'; import path from 'path'; -import yaml from 'js-yaml'; import { PackageItem } from '../theme/types'; const fileExist = (filePath) => @@ -27,11 +26,6 @@ const fetchPackages = async (): Promise => { return JSON.parse(await fs.readFile(jsonFilePath, 'utf-8')); } - const ymlFilePath = path.resolve(filePath, 'pubspec.yaml'); - if (await fileExist(ymlFilePath)) { - return yaml.load(await fs.readFile(ymlFilePath, 'utf-8')); - } - return null; }), ); diff --git a/docs/.vitepress/theme/components/packages/PackageList.data.ts b/docs/.vitepress/theme/components/packages/PackageList.data.ts index 8d38ba3d551..0649ded640c 100644 --- a/docs/.vitepress/theme/components/packages/PackageList.data.ts +++ b/docs/.vitepress/theme/components/packages/PackageList.data.ts @@ -5,9 +5,10 @@ import fetchPackages from '../../../lib/fetchPackages'; export default { async load() { const packages = await fetchPackages(); + return { packages: packages - .filter((p) => p.name in packageData) + .filter((p) => p?.name != null && p.name in packageData) .map((pData) => ({ ...pData, ...packageData[pData.name], diff --git a/docs/.vitepress/theme/components/packages/PackageList.vue b/docs/.vitepress/theme/components/packages/PackageList.vue index 8cbdc67f2d6..ba321ff4d0e 100644 --- a/docs/.vitepress/theme/components/packages/PackageList.vue +++ b/docs/.vitepress/theme/components/packages/PackageList.vue @@ -1,7 +1,8 @@ +import PackageListItem from "./PackageListItem.vue"; +