yeoman/yeoman — pull request #922 by kyen99 (2013-02-14 13:11:55+00:00)
Title: Relative path fix

Usemin already included handling for absolute paths (/img/file.jpg) and relative paths starting from the root (img/file.jpg). I added handling for relative paths starting from another folder (../img/file.jpg). This allows yeoman to work for projects that may live in a subfolder of a domain where the subfolder name is not known ahead of time. I also added a test into the usemin harness to test that ../ paths are handled properly. The test passes. I've also been using this update on my own projects for a little bit and it seems to work fine in practice.

All that had to be done was to replace the absolute path handling with a replace regex to handle / or ../ (or ../../, etc...).

If there is a better way to handle this please let me know and I will update and submit a new pull request.

I believe that all guidelines listed in the contributing doc have been met.