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

svg-to-ts-constants not creating enums #165

Closed
Bilal-io opened this issue Apr 18, 2022 · 3 comments
Closed

svg-to-ts-constants not creating enums #165

Bilal-io opened this issue Apr 18, 2022 · 3 comments

Comments

@Bilal-io
Copy link

I am seeing an issue where Enums are not created in the file generated from calling npx -p svg-to-ts svg-to-ts-constants

My config file:

{
  "name": "icons",
  "srcFiles": [
    "./icons/*.svg"
  ],
  "outputDirectory": "./dist/icons/",
  "interfaceName": "Icons",
  "typeName": "icons",
  "prefix": "icons",
  "delimiter": "KEBAB",
  "optimizeForLazyLoading": true,
  "modelFileName": "icons.model",
  "compileSources": false,
  "svgoConfig": {
    "plugins": ["removeDimensions", "cleanupAttrs"]
  },
  "generateType": true,
  "generateEnum": true,
  "enumName": "IconsEnum",
  "generateTypeObject": true,
  "verbose": true
}

The interface references the Enum, but the enum itself doesn't exist.

export interface Icons {
  name: IconsEnum;
  data: string;
}
@nivekcode
Copy link
Owner

Hi there, we fixed this issue but it's not yet released because we have reached limits on Travis CI free plan and they currently disabled our builds. I think we will need to switch to GitHub actions next and then release this fix.

@Bilal-io
Copy link
Author

Thank you for your awesome work!
I'd be happy to contribute in any capacity.

nivekcode pushed a commit that referenced this issue Apr 30, 2022
# [8.6.0](v8.5.0...v8.6.0) (2022-04-30)

### Features

* **enum:** generate enums for constants ([dc20ced](dc20ced)), closes [#165](#165)
@nivekcode
Copy link
Owner

Hi @Bilal-io thx a lot. Of course, every contribution is welcome. Feel free to take a look at one of the open issues and don't hesitate to reach out to me in case you need some help. Also, I now successfully migrated from Travis to GitHub actions and now successfully released v8.6.0 that contains a fix for this issue.

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

No branches or pull requests

2 participants