-
Notifications
You must be signed in to change notification settings - Fork 114
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
Preserve original dotted parts of filename when adding custom extension #67
Comments
Check the |
@tkellen I tried this: files: [
{
expand: true,
src: path.join("js","*.js"),
rename: function(dest,src) {
console.log(arguments);
return dest;
}
}
] Unfortunately, Update: I guess I only needed |
Glad you're up and running! We've got an open issue on this in the grunt-docs repo. I'll reference this issue there and we'll try to get it sorted. |
thanks. sounds like this bug can be closed then. :) |
Kind of sounds like a match on 1st index of "." instead of last. |
This has been resolved with the |
Since the extension filter is a suffix and typically includes the ".", I think the default value for extDot should be "last", not "first". I encountered this problem and wasn't aware of the extDot or why it was occurring. Took me awhile to figure out what was going on. Didn't help that "module.spec.coffee" worked while "ns.module.coffee" did not. My bad, of course, but still. |
@gdennie +1 |
If I set up a task like this:
This works fine unless I have compound dotted file-names, such as:
What I get created is a single
js/foo.js.gz
which both of those files seem to target, thus the subsequent overwrites the previous.What I'd like is for a way to specify that the file-extension of a source filename is ".js", and I want only THAT extension replaced by the ".js.gz" in the target file, instead of treating ".bar.js" and "bar.bam.js" as the extensions in the source filenames to be replaced.
Is this possible already and I'm not aware?
I looked through the code to try and see if there was an easy fix, but I was a little confused by how it works and how it identifies the extensions.
I was thinking maybe something like this could work:
Is that workable? If so, I'd be happy to try (with some assistance/hints) to submit a patch for it.
The text was updated successfully, but these errors were encountered: