Patrick
Patrick

Reputation: 8063

grunt-rev with images in javascript source?

I'm assigning a few pictures in JavaScript:

if(retina) {
  images.src = '../images/[email protected]';
} else {
  images.src = '../images/screen2.png';
}

How can I tell grunt-rev to change those paths as it does with the images assigned in the CSS files? In this case it should result in something like b511059b.screen2.png.

Upvotes: 1

Views: 641

Answers (1)

qianshan
qianshan

Reputation: 48

I have found the solution, if you don't want to match some files, use ! , for example: '!images/*.png'

Upvotes: 2

Related Questions