Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

prevent yeoman.io from minifying images

Tags:

yeoman

So I've been using yeoman.io for my projects and I have a set folder structure for my images. But when I build it changes the file name of my files.

I even use:

$ yeoman build:text

because I want to only minify my css,js and html templates, yet it still minifies the images. Not sure if im doing something wrong.

EDIT:

I commented out all instances of img in the gruntfile and that seemed to work, but I dont think thats the right way.

like image 347
Robert Avatar asked Jan 10 '13 16:01

Robert


1 Answers

You mean image optimization or revisioning? There is no problem to configure GruntFile.js to your own needs. It makes Yeoman/Grunt very powerful, because it is highly adaptable.

If you don't want image optimization, remove the configuration in the img task.

// Optimizes JPGs and PNGs (with jpegtran & optipng)
   img: {
   },

If you dont want the renaming of image files, remove the img line from the rev task:

// renames JS/CSS to prepend a hash of their contents for easier
// versioning
rev: {
  js: 'scripts/**/*.js',
  css: 'styles/**/*.css'
},
like image 174
asgoth Avatar answered Oct 16 '22 13:10

asgoth