-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
extension is after _last_ period only #750
Conversation
in file.expandMapping, fix destPath replace such that only the extension is replaced, not anything after the first '.' of the last path segment. In other words, if the source file is 'my/dir/path/test.single.js', only the final '.js' should be considered the extension, not '.single.js', and only that should be replaced.
@cowboy i think it's time we discussed a way to support both of these formats |
I was thinking of that yesterday, actually. But it just seemed totally unnecessary since the |
The
I can understand not wanting to rock the boat with current users, but as the current designed behaviour does not match the general expectation of what constitutes an "extension," the documentation should at least explicitly define its actual behaviour. Something like:
|
I added some comments to gruntjs/grunt-contrib-uglify#54 Perhaps one of the approaches there could be a way forward, or serve to help get the creative juices flowing on an alternative? |
FYI, I added support for this into node-globule which will, eventually, be upstreamed back into Grunt. |
That'll work. Thank you! |
It would be nice to change this. Is there agreement that "everything after the last dot" is the right way to calculate extension, just not agreement on the right way to migrate existing users, or is there a fundamental problem with the change request? |
@cowboy What is the status of upstreaming node-globule ? Can we use the |
extDot could be used for world peace! Why can't I create world peace yet? Not in grunt version "0.4.2" yet. |
I'm actively working on globule. I hope to have a new version released soon. I can't guarantee when it will make it into Grunt however, because it may introduce backwards-incompatible changes. For now, please use the |
This has been resolved with the |
IMHO what would have been event better is a |
in file.expandMapping, fix destPath replace such that only the extension
is replaced, not anything after the first '.' of the last path segment.
In other words, if the source file is 'my/dir/path/test.single.js', only
the final '.js' should be considered the extension, not '.single.js',
and only that should be replaced.