mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 18:47:43 +01:00
* feat(icons): add deprecationReason and alias deprecation feature * chore(tools): run prettier. again. * fix(scripts): overall alias as object support * fix(icon.schema.json): add dependentRequired on deprecated properties * fix(icon.schema.json): remove unicode for now * fix(icon.schema.json): use const true for deprecated * fix(build): convert deprecation reason to enum * fix(build): fix linting of icon.schema.json * fix(build): renamed gracePeriod => toBeRemovedInVersion * fix(build): fix aliases map in related icons generation * fix(build): deprecate aliases using numbers * feat(icon-schema): separate deprecation reason enumerations, extract removal notice * fix(icon-schema): fix linting * Update tools/build-icons/utils/deprecationReasonTemplate.mjs * fix(icons): add deprecation reason to some more icons * fix(docs): fix linting issue --------- Co-authored-by: Karsa <karsa@sztaki.hu> Co-authored-by: Jakob Guddas <github@jguddas.de>
38 lines
810 B
JavaScript
38 lines
810 B
JavaScript
import path from 'path';
|
|
import { getCurrentDirPath, writeFileIfNotExists } from '../helpers.mjs';
|
|
|
|
const currentDir = getCurrentDirPath(import.meta.url);
|
|
const ICONS_DIR = path.resolve(currentDir, '../../icons');
|
|
|
|
const iconNames = process.argv.slice(2);
|
|
|
|
const iconSvgTemplate = `<svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
width="24"
|
|
height="24"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
</svg>
|
|
`;
|
|
|
|
const iconJsonTemplate = `{
|
|
"$schema": "../icon.schema.json",
|
|
"contributors": [
|
|
],
|
|
"tags": [
|
|
],
|
|
"categories": [
|
|
]
|
|
}
|
|
`;
|
|
|
|
iconNames.forEach((iconName) => {
|
|
writeFileIfNotExists(iconSvgTemplate, `${iconName}.svg`, ICONS_DIR);
|
|
writeFileIfNotExists(iconJsonTemplate, `${iconName}.json`, ICONS_DIR);
|
|
});
|