indiana-university / rivet-icons

Icons for Indiana University's Rivet Design System
https://rivet.iu.edu/icons-stickers/
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

Fix paths in Windows #89

Closed basham closed 2 years ago

basham commented 2 years ago

My team is integrating Rivet Icons v1.0.0 in one of our projects. Both developers on the team that uses Windows is unable to properly build the icons.

When the library generates the paths to the SVG icons to read them, path.resolve() returns paths on Windows with double backslashes. The first backslash escapes the second. The use of backslashes in paths is the convention for Windows. However, these paths are then passed to fast-glob. As of v3.0.0, that library will only bother with paths in the Unix forward-slash style. The recommended solution is to just replace the slashes.

This PR is just following this recommendation. This fix did work on the Windows environment that we were using.

This would result in a v1.0.1 patch release.