-
Notifications
You must be signed in to change notification settings - Fork 350
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
Filenames containing dots get cut off #54
Comments
+1 Is there a known workaround for this? |
The Check out: gruntjs/grunt#625 To get it working how you're wanting, pass a |
Thank you for the workaround and, while I understand the discussion held in gruntjs/grunt#625 it does seem to be redefining convention. http://en.wikipedia.org/wiki/Filename_extension Other than behaving in an unexpected fashion (by convention anyway), what is the most common use case for uglify? If it is to minify js code, the current behavior flies in the face of DRY as anyone using grunt to minify JS could using expansion now has to implement the code to use the last dot convention. It's not that it isn't trivial, just that it shouldn't be necessary. If it would be considered too much of a breaking change to use the more standard convention by default, perhaps an additional configuration parameter: useLastDot: true to change the behavior could be considered? Or if someone was feeling really energetic useDot: n where n is a negative or positive number (1 == first dot, -1 == last dot, -2 == second to last dot [.min.js]) The explaination given in gruntjs/grunt#625 also seems a bit flawed in that a quick glance around at jquery plugins should a number with multiple dots in the names (i.e.: myplugin.jquery.js ==> myplugin.jquery.min.js) First dot convention is broken here as well. Or perhaps I am missing something more fundamental? |
@davidcl64 I don't disagree with you one bit :) Both @tkellen and @cowboy mention revisiting this in gruntjs/grunt#750, so I would definitely continue the conversation over there as this affects more than just the uglify plugin. |
sounds like a plan! :) |
this thread has helped me! 👍 |
I have set up a task to minify, add the suffix .min and write to file to the same folder:
expected result
dragin/without_dots.js.js -> dragin/without_dots.js.min.js
dragin/dragin.jquery.js -> dragin/dragin.jquery.min.js
obtained result
dragin/without_dots.js.js -> dragin/without_dots.js.min.js
dragin/dragin.jquery.js -> dragin/dragin.min.js
the .jquery part of dragin.jquery.js gets cut off
Output of
My task configuration
The text was updated successfully, but these errors were encountered: