diff --git a/.eslintrc.js b/.eslintrc.js index 6378b679d5f..7619a428e92 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,4 @@ -const DEFAULT_ATTRS = require('./scripts/render/default-attrs.json'); +const DEFAULT_ATTRS = require('@lucide/build-icons/render/default-attrs.json'); module.exports = { root: true, @@ -15,7 +15,9 @@ module.exports = { 'no-use-before-define': 'off', 'import/no-extraneous-dependencies': [ 'error', - { devDependencies: ['**/*.test.js', '**/*.spec.js', './scripts/**'] }, + { + devDependencies: ['**/*.test.js', '**/*.spec.js', '**/scripts/**'], + }, ], 'import/extensions': [ 'error', 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"; +