gruntjs/grunt-contrib-coffee — pull request #64 by matthewwithanm (2013-03-28 20:13:43+00:00)
Title: Fix Error w/ Mixed Extensions and Maps

I was attempting to use a config like the following:

```coffeescript
coffee:
options:
sourceMap: true
files:
expand: true
cwd: '/path/to/files/'
src: ['**/*.coffee', '**/*.litcoffee']
dest: '/path/to/files/'
ext: '.js'
```

But getting an error on the literate files. It turns out that this is because `compileWithMaps` doesn't pass the filepath to `compileCoffee` when compiling single files. Since `compileCoffee` doesn't have the filepath, it doesn't know that the source is literate and attempts to compile it as regular CoffeeScript.

This change passes the filepath when `compileWithMaps` is called with a single path. While this addresses my problem, I believe that there's still an issue if `compileWithMaps` is called with multiple litcoffee—and only litcoffee—files. It might be best to determine whether literate compilation should be used outside of `compileCoffee` and pass it as an argument instead of attempting to derive it from an optional parameter. In the meantime though, this small change will fix it for most cases, and shouldn't have any backwards-compatibility issues.