-
Notifications
You must be signed in to change notification settings - Fork 52
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
Check if dest
is a directory
#107
Comments
I think this would help me, too. I have a task that converts an SVG to several PNGs in a destination folder. This takes some time, so I only really want to run it again when the single So, I think what we are asking for is:
Does this make sense? Happy to provide further info if you're interested. [ Note: I'm trying grunt-newer in a different branch to the one I linked to above, which is why it's not in the Gruntfile (yet) ] |
@matatk Check out my fork, where I fixed this issue: sevarubbo/grunt-newer. Since it looks like this project is not being supported for quite a long time, I think the only option is to make forks :) It's quite easy to use, actually. In your |
Hi @sevarubbo, and thanks for your reply. I checked out your fork, and it does exactly what you said it does; thanks. However, I now realise this is not actually exactly what I need... My problem is that when I configure grunt-phantom-rasterize to generate output files in the correct output directory, grunt-newer thinks that the output files are not there, and always re-runs the task. This is the output from
The problem is that the output files have names like "landmarks-32.png" and "landmarks-48.png" and not just "landmarks.svg". My current files: [{
expand: true,
cwd: srcAssembleDir,
src: 'landmarks.svg',
dest: path.join('..', '..', pngCacheDir)
}] I did try to reconfigure the files: [{
src: path.join(srcAssembleDir, 'landmarks.svg'),
dest: path.join('..', '..', pngCacheDir)
}] In this case, your fork of grunt-newer behaves perfectly, detecting that
However, when I set up the I can think of a hacky solution: simply move the PNG files to the cache directory when they have been generated, but this feels totally wrong. However, this is now somewhat off topic for grunt-newer I think! So I will try to figure it out. Thanks to @tschaub for writing this in the first place and to you @sevarubbo for your updates. Update: actually I just re-checked and grunt-newer doesn't work if I use |
There should be an option to use only changed files from
src
ifdest
is a directory. I have a task that makes operation in files and moves them to a folder and I want to perform these operations only on changed files, not all of them.The text was updated successfully, but these errors were encountered: