Hi everyone,
I'm trying to add image minification to the Adapt build process and have ran into some issues.
Here is what I've have done so far:
- Installed grunt-contrib-imagemin and imagemin-mozjpeg (dependancy).
- Created a Grunt task called "imagemin".
- Created a Grunt task config called "imagemin".
- Added "imagemin" to the last line of the build task. (we only want this when we build, not dev)
The build runs great, up to the point where it tries to run this new task. The error given is ">> No "imagemin" targets found. Warning: Task "imagemin" failed. Use --force to continue."
Playing around with the paths doesn't change the result, however, adding all the code to the main gruntfile.js allows it to run correctly but causes all the other adapt tasks to no longer work (path issues).
What am I missing? Is there a different way to go about minifing the images on build? Since this forum doesn't have a good way to display code, the zip file attached has the files in question.
Thanks in advance for your help.