Skip to content

v3.0.0

Compare
Choose a tag to compare
@nivekcode nivekcode released this 25 Feb 15:07
· 482 commits to master since this release

3.0.0 (2020-02-25)

Features

  • input: Handle regex as sourceDir (12d7bf9)
  • sources: use source files as regex (69547dd)

BREAKING CHANGES

  • sources: srcDirectories is gone and we should now use srcFiles

Migration path:

To find the SVG source files, we now use a regular expression. Therefore we changed the -srcDirectories (-s) option to -srcFiles (-s).

How to migrate:

  • If you are using the long syntax to specify the sourceDirecotry (-srcDirectories) please rewrite it to either -srcFiles or -s and change the path to a regex.
  • If you are using the -s param, change the path to a regex

How to change the path to a Regex:

  • Usually its enough to append *.svg to your current path. So for example ./somePath/ becomes ./somePath/*.svg
  • Make sure to add quotes around your regex, otherwise it will be pre-evaluated and take the first match. So "svg-to-ts -s ./somePath/*.svg" will not work. It should be "svg-to-ts -s './somePath/*.svg'" with quotes