From b3b1d106336c2f401473b144d6d0efd068bc6cf7 Mon Sep 17 00:00:00 2001 From: Amirreza Amini <76916498+amirrezamini@users.noreply.github.com> Date: Wed, 20 Nov 2024 06:28:46 +0330 Subject: [PATCH] fix: `excludeFormat` exclude svg (#248) --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 9d82c243..0ad7ce39 100644 --- a/src/index.ts +++ b/src/index.ts @@ -332,6 +332,10 @@ export default async (options: SvgToFontOptions = {}) => { if (excludeFormat.includes('ttf')) { fs.removeSync(ttfPath); } + const svgPath = path.join(options.dist, options.fontName + ".svg"); + if (excludeFormat.includes('svg')) { + fs.removeSync(svgPath) + } if (options.css) { const styleTemplatePath = options.styleTemplates || path.resolve(__dirname, 'styles')