From 06ac076c2481b48fc0e38c20437da02b37e049db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kater=CC=8Cina=20Dlouha=CC=81?= Date: Mon, 27 Nov 2023 14:23:51 +0100 Subject: [PATCH] Fix(icons): Ignore sprite.svg while generating React icon components See https://github.com/lmc-eu/spirit-design-system/commit/7a4e15912cab5208d5299afed6d6f1b09a923c4a. --- packages/icons/scripts/prepareSvgReact.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icons/scripts/prepareSvgReact.js b/packages/icons/scripts/prepareSvgReact.js index 828e296..f5d8e20 100644 --- a/packages/icons/scripts/prepareSvgReact.js +++ b/packages/icons/scripts/prepareSvgReact.js @@ -14,7 +14,7 @@ const toPascalCase = (string) => const prepareSvgForReactComponent = (srcDir, distDir) => { fs.readdir(srcDir, (err, files) => { - const svgs = files.filter((el) => path.extname(el) === '.svg'); + const svgs = files.filter((el) => path.extname(el) === '.svg' && el !== 'sprite.svg'); if (svgs.length > 0) { svgs.forEach((svg) => { const svgPath = path.join(srcDir, svg);