nivekcode/svg-to-ts

exportCompleteIconSet false still generates completeIconSet const

Closed this issue · 1 comments

version 8.3.0

Just as the title says, after updating from version 7 and changing my build scripts to use the new binary, my final output file adds a new array of all the icons completeIconSet even if the config flag is set to false.

package.json:

"scripts": { 
    "build" : "svg-to-ts-constants"
},
"svg-to-ts": { 
    "compileSources": true,
    "exportCompleteIconSet": false
}

output.ts

/* 🤖 this file was generated by svg-to-ts */

export const iconName = { ... }
(export const iconName for each icon, as expected)

export type myIcons = iconName | iconName2 ... 
(type declaration of all my icon names, as expected)

// why is this added when config is set to false? 
export const completeIconSet = [ ...all of my icons ];

Thx a lot for reporting this issue. There's an issue with the handling of the boolean flags which was actually not only affecting the exportCompleteIconSet.