mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 09:28:23 +02:00
* chore(lab): Adjust build scripts * add check workflow * Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * update gitignore --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
21 lines
733 B
TypeScript
21 lines
733 B
TypeScript
import path from 'path';
|
|
|
|
import { readSvgDirectory, getCurrentDirPath } from '@lucide/helpers';
|
|
import readSvgs from './readSvgs.mts';
|
|
import generateIconNodes from './generateIconNodes.mts';
|
|
import copyIcons from './copyIcons.mts';
|
|
|
|
import pkg from '../package.json' with { type: 'json' };
|
|
|
|
const currentDir = getCurrentDirPath(import.meta.url);
|
|
|
|
const PACKAGE_DIR = path.resolve(currentDir, '../');
|
|
const ICONS_DIR = path.join(PACKAGE_DIR, '../../lab');
|
|
|
|
const license = `@license ${pkg.name} v${pkg.version} - ${pkg.license}`;
|
|
|
|
const svgFiles = await readSvgDirectory(ICONS_DIR);
|
|
const svgs = await readSvgs(svgFiles, ICONS_DIR);
|
|
|
|
await Promise.all([generateIconNodes(svgs, PACKAGE_DIR), copyIcons(svgs, PACKAGE_DIR, license)]);
|