nivekcode / svg-to-ts

Build performant SVG icon libraries by converting raw SVG files to TypeScript that is optimized for modern tree shaking mechanisms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export all icons from icons.ts (conversionType==='constants')

Guzel738 opened this issue · comments

Environment

  • Angular 12;
  • svg-to-ts 6.0.2.

Problem

In the second approach to converse types (conversionType==='constants'), generated file icons.ts doesn`t contain export of all icons. So everytime we add new icon in method registerIcons() and we need to add this icon to the import list.

It should be better to have singe export with all constants as : export const all = [icon1, icon2, ...].

Would it be possible to add this functionality?

commented

Yes, that would make perfect sense. I will try to add this feature once I find the time.

commented

Hi @Guzel738 with version 8.3 a complete icon set gets generated by default when using the constant conversion type

Thank you!