mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-14 13:58:21 +00:00
* Implement deprecate comment lucide-react * Add export template with comment * Add block comment to Lucide Svelte * Add blockcomment to lucide-angular * Add block comment to lucide-static * revert runtime change build:tags * Fix failed tests * Remove optional property in icon schema
17 lines
538 B
JavaScript
17 lines
538 B
JavaScript
import path from 'path';
|
|
import { readSvgDirectory } from '../../../scripts/helpers.mjs';
|
|
|
|
async function getIconMetaData(iconDirectory) {
|
|
const iconJsons = readSvgDirectory(iconDirectory, '.json');
|
|
const aliasesEntries = await Promise.all(
|
|
iconJsons.map(async (jsonFile) => {
|
|
const file = await import( path.join(iconDirectory, jsonFile), { assert: { type: 'json' } });
|
|
return [path.basename(jsonFile, '.json'), file.default]
|
|
})
|
|
)
|
|
|
|
return Object.fromEntries(aliasesEntries);
|
|
}
|
|
|
|
export default getIconMetaData
|