Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exportCompleteIconSet false still generates completeIconSet const #156

Closed
rgreenhalge opened this issue Feb 16, 2022 · 1 comment · Fixed by #157
Closed

exportCompleteIconSet false still generates completeIconSet const #156

rgreenhalge opened this issue Feb 16, 2022 · 1 comment · Fixed by #157
Assignees

Comments

@rgreenhalge
Copy link

rgreenhalge commented Feb 16, 2022

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 ];
@nivekcode
Copy link
Owner

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.

@nivekcode nivekcode self-assigned this Feb 21, 2022
nivekcode pushed a commit that referenced this issue Feb 21, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
## [8.3.1](v8.3.0...v8.3.1) (2022-02-21)

### Bug Fixes

* **flag handling:** only apply default for non provided flags ([e2b42f1](e2b42f1)), closes [#156](#156)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants