Gruntfile does not correctly rename image paths in CSS files [closed]

5

My Gruntfile.js is set up as follows:

// Performs rewrites based on rev and the useminPrepare configuration
usemin: {
  html: ['<%= yeoman.dist %>/{,*/}*.html', '<%= yeoman.dist %>/views/{,*/}*.html'],
  css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
  options: {
    assetsDirs: ['<%= yeoman.dist %>']
  }
},

The problem is that image paths within CSS files do not change, but image files themselves are named by rev , thus causing link of broken images after the Grunt command.

Has anyone gone through this and knows the solution?

    
asked by anonymous 23.09.2014 / 19:35

1 answer

0

You've tried it like this:

usemin: {
  html: ['<%= yeoman.dist %>/*.html', '<%= yeoman.dist %>/*/*.html', '<%= yeoman.dist %>/*/*/*.html'],
  css: ['<%= yeoman.dist %>/styles/*.css', '<%= yeoman.dist %>/styles/*/*.css'],
  options: {
    assetsDirs: ['<%= yeoman.dist %>']
  }
},
    
21.01.2015 / 01:36