-
Notifications
You must be signed in to change notification settings - Fork 53
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
New files not being detected when src and dest are the same #40
Comments
I'm dealing with this exact issue as well. It seems like we can force grunt-newer into thinking that it's in the mode where there's only src and no dest then it should work (a naïve guess based on reading the README.) |
Just tested my theory by changing lib/util.js line 72 from I'm happy to fix it but I'm not sure what opinion you want imposed on it. |
We're also running into this issue. Any thoughts on when the pull request might be merged @tschaub? Thanks. |
Alas, can reproduce the issue using grunt-newer v.0.8.0. Shall I open a new issue with my config? |
The problem persists in v1.1.0. I could solve it with the following override:
then in config:
In the plugin mtime is used instead of ctime, and this may be the problem, since mtime is set with the last modification. If you are importing a file with git or bower, mtime may be older than the last time you last run the task. I tried to run the new plugin checking ctime, but had no success and at the time I have no time to look deeper in the plugin code. Still the code above is a quick fix for all newer tasks where files are added. |
A bit more info. I'm using grunt-contrib-imagemin to optimise some folders of images, and grunt-newer to stop imagemin from optimising files it has already optimised.
I'm not sure if I'm just misunderstanding how grunt-newer works, but it doesn't seem to detect when I add new files to my image directories. It just says "No newer files to process":
It seems the reason for this is because in my config I've set my source and destination directories to be the same location (which was intentional) - see my config below:
Is there a way round this?
The text was updated successfully, but these errors were encountered: