yeoman / grunt-usemin

[UNMAINTAINED] Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views)
BSD 2-Clause "Simplified" License
1.22k stars 339 forks source link

Allow patterns to return multiple filenames #458

Open aendra-rininsland opened 10 years ago

aendra-rininsland commented 10 years ago

As per #428, it's currently not possible to write a pattern to parse an attribute with multiple filenames. The best example would be srcset, due to its comma-separated format:

srcset="image@2x.png 2x, image@4x.png 4x, image@6x.png ...

As requested by @sindresorhus in #457, I'm separating this into its own issue.

xpicio commented 9 years ago

any news about this feature ? is there any workaround to replace image url with the revved version on srcset attribute ?

stephanebachelier commented 9 years ago

457 is merged.

xpicio commented 9 years ago

sorry, i mean srcset with multiple values as follows:

<img src="/images/logo.jpg"
                   srcset="/images/logo.jpg 213w, /images/logo-2x.jpg 425w, /images/logo-3x.jpg 850w"
                   sizes="213px">
stephanebachelier commented 9 years ago

@xpicio I was only saying that #457 which is about adding support has been merged. But support is for now limited to only one value in srcset. We still need to fix this issue to support multiple values.