Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newer:imagemin:dynamic and newer:imagemin when only one in task #46

Open
dheian opened this issue May 20, 2014 · 4 comments
Open

newer:imagemin:dynamic and newer:imagemin when only one in task #46

dheian opened this issue May 20, 2014 · 4 comments

Comments

@dheian
Copy link

dheian commented May 20, 2014

Installed newer today and started using it with imagemin. Though the only task specified is newer:imagemin:dynamic, I found that it ran followed by imagemin dynamic:

Running "newer:imagemin:dynamic" (newer) task
Running "imagemin:dynamic" (imagemin) task

Here's the config:

module.exports = function(grunt) {
var mozjpeg = require('imagemin-mozjpeg');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
imagemin: {                          // Task
dynamic: {
 files: [{
    expand: true,                  // Enable dynamic expansion
    cwd: '.',                   // Src matches are relative to this path
    src: ['**/*.{png,jpg,gif}'],   // Actual patterns to match
    dest: '.'                  // Destination path prefix
  }]
    }
}
  });
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('default', ['newer:imagemin:dynamic']);
};

Thanks for any advice.

@elliot619
Copy link

Here with the same issue, anyone with a solution?

@codephobia
Copy link

+1

@dimitarkolev
Copy link

Please make grunt-newer work again with grunt-contrib-imagemin. It doesn't no matter how you configure it.

@kfiku
Copy link

kfiku commented Apr 15, 2016

Hi i find solution to this issue. In my example imagemin changes modification date of image by cleaning milliseconds from original file.
Original file: 2016-04-15 12:16:14.877814125 +0200
Complied file: 2016-04-15 12:16:14.000000000 +0200
my solution to this is set option in newer task tolerance: 1000 or more.

options: {
  tolerance: 1000
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants