Using Gulp and Node.js, I'm creating a proof of concept that generates sprites from folders of images, then versions the generated sprites so they have unique file names for cache busting purposes.
I'm using https://www.npmjs.com/package/gulp-rev to version the sprites (this works!), but I'm having trouble updating CSS files with references to the images. There are some tools that I have looked at for this purpose but I haven't been able to get them to work. The two that I have look at are:
https://github.com/jamesknelson/gulp-rev-replace
(Seems fully featured by can't figure it out)
and..
https://github.com/galkinrost/gulp-rev-css-url
(Got working but couldn't separate the destination for the revisioned images files and the updated CSS with the new images names)
Essentially I want to grab all the images from gulp-image-versioning-poc/images/sprites/*.png
and then version them, put the resulting images in gulp-image-versioning-poc/dist/
and update the references to those images in gulp-image-versioning-poc/css/*.css
I've created a simplified example of what I currently have here:
https://github.com/olthof/gulp-image-versioning-poc
If anyone could help me tackling this problem I would be very grateful!!!