Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/scripts/writeIconNodes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { readSvgDirectory, toCamelCase } from '@lucide/helpers';
const currentDir = process.cwd();
const ICONS_DIR = path.resolve(currentDir, '../icons');
const svgFiles = readSvgDirectory(ICONS_DIR);
const icons = renderIconsObject(svgFiles, ICONS_DIR, true);
const icons = await renderIconsObject(svgFiles, ICONS_DIR, true);

const iconNodesDirectory = path.resolve(currentDir, '.vitepress/data', 'iconNodes');

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"prettier": "3.2.4",
"semver": "^7.5.4",
"simple-git": "^3.25.0",
"svgo": "^3.1.0",
"svgo": "^3.3.2",
"svgson": "^5.3.1",
"yargs": "^17.7.2"
},
Expand Down
10 changes: 8 additions & 2 deletions packages/lucide-angular/scripts/exportTemplate.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';

export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
export default ({
componentName,
iconName,
children,
svgContents,
deprecated,
deprecationReason,
}) => {
const svgBase64 = base64SVG(svgContents);

return `\
Expand Down
10 changes: 8 additions & 2 deletions packages/lucide-preact/scripts/exportTemplate.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';

export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
export default ({
componentName,
iconName,
children,
svgContents,
deprecated,
deprecationReason,
}) => {
const svgBase64 = base64SVG(svgContents);

return `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@ exports[`Using lucide icon components > should adjust the size, stroke color and
stroke-linejoin="round"
class="lucide lucide-grid3x3"
>
<rect width="18"
height="18"
x="3"
y="3"
rx="2"
>
</rect>
<path d="M3 9h18">
</path>
<path d="M3 15h18">
</path>
<path d="M9 3v18">
</path>
<path d="M15 3v18">
<path d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2M3 9h18M3 15h18M9 3v18M15 3v18">
</path>
</svg>
`;
Expand All @@ -42,20 +29,7 @@ exports[`Using lucide icon components > should not scale the strokeWidth when ab
stroke-linejoin="round"
class="lucide lucide-grid3x3"
>
<rect width="18"
height="18"
x="3"
y="3"
rx="2"
>
</rect>
<path d="M3 9h18">
</path>
<path d="M3 15h18">
</path>
<path d="M9 3v18">
</path>
<path d="M15 3v18">
<path d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2M3 9h18M3 15h18M9 3v18M15 3v18">
</path>
</svg>
`;
Expand All @@ -72,20 +46,7 @@ exports[`Using lucide icon components > should render an component 1`] = `
stroke-linejoin="round"
class="lucide lucide-grid3x3"
>
<rect width="18"
height="18"
x="3"
y="3"
rx="2"
>
</rect>
<path d="M3 9h18">
</path>
<path d="M3 15h18">
</path>
<path d="M9 3v18">
</path>
<path d="M15 3v18">
<path d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2M3 9h18M3 15h18M9 3v18M15 3v18">
</path>
</svg>
`;
10 changes: 8 additions & 2 deletions packages/lucide-react-native/scripts/exportTemplate.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';

export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
export default ({
componentName,
iconName,
children,
svgContents,
deprecated,
deprecationReason,
}) => {
const svgBase64 = base64SVG(svgContents);

return `
Expand Down
Loading