check for blank extension & rolled extension into options #14

wants to merge 1 commit into


None yet

2 participants


i was having the issue of scripts with extension compiling to .js.js. Passing a blank string in as the extension was ignored and revert to the default. There is now a check to allow the extension to be ''.

It also seemed like the options object would be a good place for the extension option. tests added :)

@avalade avalade added a commit that referenced this pull request Aug 29, 2012
@avalade Addressed duplicate .js.js extensions
This fixes the issues:

* avalade/grunt-coffee#16
* avalade/grunt-coffee#14

I've also added in a check where, if you're 
compiling a .js file, it just copies it into
the appropriate directory based upon the 
output directory setting and the preserve 
directories setting.
avalade commented Aug 29, 2012

Thanks for the pull request and apologies about the delay as I've been away traveling without access to my repos.

I've addressed this concern of yours in commit 5b5f1cc. Please let me know if this will work for you and if I can add you to the contributors and then I'll do a release.


excellent! looks good to me. and you are welcome to add me but im not sure i contributed enough!

also... im curious why extension isn't a part of the options object?

avalade commented Aug 30, 2012

The options was originally just supposed to be options for the coffee-script compiler. However, I let the preserve_dirs argument leak into the options args by accident. If I was doing a bigger change to the plugin, I'd move the extension into the options as well and make the options contain a coffee-script-options element, but since this change is a small one, I don't want to do much more than do a patch release which requires me to keep everything backwards compatible.

But in the future, when I do a minor version increment, I'll collapse the extension into the options argument.

@avalade avalade closed this Aug 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment