question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allowing multiple sets of configurations in the package.json

See original GitHub issue

Hi @kreuzerk, I pulled the latest version of svg-to-ts, and unfortunately, I can’t use it with the new configuration file. If the docs are up to date, you can only have: one set of source files and one output directory. I have a big project, and for performance reasons, I need to generate six files at various locations in my project.

I was wondering if the svg-to-ts entry, in the package.json you could also allow an set of configurations, not just only one.

It is possible to achieve that using command line (multiple times with different parameters) but it would be nice if I can have everything within the same configuration file.

Congratulations on your project, this is a fantastic tool. Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kreuzerkcommented, Oct 7, 2020

In the upcoming version 5.4.0 svg-to-ts can handle multiple configurations like this:

[
  {
    "conversionType": "files",
    "srcFiles": [
      "./svg-icons/one/**/*.svg"
    ],
    "outputDirectory": "./dist/one",
    "interfaceName": "MyIconOne",
    "typeName": "myIconOne",
    "prefix": "myIconOne",
    "exportCompleteIconSet": true,
    "optimizeForLazyLoading": true,
    "modelFileName": "my-icon-one.model",
    "compileSources": true
  },
  {
    "conversionType": "files",
    "srcFiles": [
      "./svg-icons/two/**/*.svg"
    ],
    "outputDirectory": "./dist/two",
    "interfaceName": "MyIconTwo",
    "typeName": "myIconTwo",
    "prefix": "myIconTwo",
    "exportCompleteIconSet": true,
    "optimizeForLazyLoading": true,
    "modelFileName": "my-icon-two.model",
    "compileSources": true
  }
]
0reactions
KingDarBojacommented, Sep 5, 2020

Also, should it be possible to add a shared interface for both configuration where TechnicianIcon and CompanyIcon can extend from? Something like sharedModelName: BaseIcon ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create Configurations for Different Environments in ...
Having multiple configurations can be handy for your node applications. ... Create your package.json file using npm init. Save the config ...
Read more >
Run tests with multiple sets of configurations #240 - GitHub
I have same sets of JSON data with configurations (TestID,Browser Type, Device Type, Url etc. ). Is there a way i can use...
Read more >
How to use multiple configuration files in webpack?
All of my development configurations are in webpack.config.js file. Then, I add it into package.json script via 'dev':'webpack-dev-server'.
Read more >
package.json - npm Docs
This is a set of config values that will be used at publish-time. It's especially handy if you want to set the tag,...
Read more >
Configuring package.json · Jest
The path to a module that runs some code to configure or set up the testing framework before each test. Since setupFiles executes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found