mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-17 14:28:25 +00:00
feat(site): Better icon detail page and add unreleased flag (#4877)
* setup icon popularity call * Adjust sort button * Adjust sorting * Adds aliases * Format code * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add check for env variable * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Improve styling on mobile * Better icon detail page * Update detail page * feat: make edit button more visible * Fix types * Add unreleased version tag * Adjust icon detail * Added edit button * format code * Replace pencil sparkles * Revert changes * Fix types * Add docs checks * Fix types * Fix awaiting release * revert icons changes * Format code * Fix type issues * Update CarbonAdOverlay to not display Disable CarbonAdOverlay by setting drawerOpen to false. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Fix types * Fix condition for showing awaiting release icons Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Format code --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jakob Guddas <github@jguddas.de>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
Jakob Guddas
parent
99c1037550
commit
ba6751ac45
@@ -20,6 +20,7 @@ if (!fs.existsSync(iconNodesDirectory)) {
|
||||
|
||||
const iconIndexFile = path.resolve(iconNodesDirectory, `index.ts`);
|
||||
const iconIndexFileImports: string[] = [];
|
||||
const iconIndexFileNodes: string[] = [];
|
||||
const iconIndexFileExports: string[] = [];
|
||||
const iconIndexFileDefaultExports: string[] = [];
|
||||
|
||||
@@ -32,7 +33,10 @@ const writeIconFiles = Object.entries(icons).map(async ([iconName, { children }]
|
||||
await fs.promises.writeFile(location, output, 'utf-8');
|
||||
|
||||
iconIndexFileImports.push(
|
||||
`import ${toCamelCase(iconName)}Node from './${iconName}.node.json' with { type: "json" };`,
|
||||
`import ${toCamelCase(iconName)}Json from './${iconName}.node.json' with { type: "json" };`,
|
||||
);
|
||||
iconIndexFileNodes.push(
|
||||
`const ${toCamelCase(iconName)}Node = ${toCamelCase(iconName)}Json as IconNode;`,
|
||||
);
|
||||
iconIndexFileExports.push(` ${toCamelCase(iconName)}Node as ${toCamelCase(iconName)},`);
|
||||
iconIndexFileDefaultExports.push(` '${iconName}': ${toCamelCase(iconName)}Node,`);
|
||||
@@ -43,16 +47,19 @@ try {
|
||||
await fs.promises.writeFile(
|
||||
iconIndexFile,
|
||||
`\
|
||||
import type { IconNode } from '../../../theme/types';
|
||||
${iconIndexFileImports.join('\n')}
|
||||
|
||||
${iconIndexFileNodes.join('\n')}
|
||||
|
||||
export {
|
||||
${iconIndexFileExports.join('\n')}
|
||||
}
|
||||
|
||||
export default {
|
||||
${iconIndexFileDefaultExports.join('\n')}
|
||||
}
|
||||
`,
|
||||
} satisfies Record<string, IconNode>;
|
||||
`,
|
||||
'utf-8',
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user