jaywcjlove / svgtofont

Read a set of SVG icons and ouput a TTF/EOT/WOFF/WOFF2/SVG font.
https://jaywcjlove.github.io/svgtofont
MIT License
542 stars 85 forks source link

Having multiple source folders #219

Closed lhtdesignde closed 8 months ago

lhtdesignde commented 8 months ago

Hi, first off, thanks for the great package! It does everything I need! I have a question regarding the sources in the npm script. At the moment I have the following script in the package.json:

"font": "svgtofont --sources ./src/assets/icons/** --output ./src/assets/iconfont"

  └── icons
      ├── folder-A
          └── icon.svg
      ├── folder-B
           └── icon.svg
      └── folder-C
         └── icon.svg

That works but not as expected. In the folder icons are another 5 folders with icons. At the moment it only gets the icons from the first folder and ignores the rest. Is there a way to make it use all folders and not just the first one within icons? Thanks!

jaywcjlove commented 8 months ago

@lhtdesignde You can first use the cpy-cli command to copy the image to a directory, and then run svgtofont

lhtdesignde commented 8 months ago

Thank you! Alright. That would work, guess i can then also remove that tmp directory then. Not ideal but works.