avalade/grunt-coffee — pull request #20 by Iristyle (2012-09-10 17:33:15+00:00)
Title: Fixes bug in base_path resolution

Due to how paths are shipped around,
base_path would not correctly handle files in the root path, nesting them.

For instance, a base_path of 'app/js' has been passed,
which becomes 'app/js/' in the task.

Notice in the output that all files are properly re-based,
except for those directly inside 'app/js/' (namely main.js, app.js):

```
Running "coffee:app" (coffee) task
Verifying property coffee.app exists in config...OK
>> Note that grunt.utils has been renamed to grunt.util and is now deprecated.
>> Please ensure that your custom tasks are up-to-date. (grunt 0.4.0+)
Reading app/js/app.coffee...OK
Writing generated\js\app\js\app.js...OK
Reading app/js/controllers/auth.coffee...OK
Writing generated\js\controllers\auth.js...OK
Reading app/js/directives/directives.coffee...OK
Writing generated\js\directives\directives.js...OK
Reading app/js/filters/filters.coffee...OK
Writing generated\js\filters\filters.js...OK
Reading app/js/main.coffee...OK
Writing generated\js\app\js\main.js...OK
Reading app/js/services/auth.coffee...OK
Writing generated\js\services\auth.js...OK
```

With this fixed, we get the following desired output

```
Running "coffee:app" (coffee) task
Verifying property coffee.app exists in config...OK
>> Note that grunt.utils has been renamed to grunt.util and is now deprecated.
>> Please ensure that your custom tasks are up-to-date. (grunt 0.4.0+)
Reading app/js/app.coffee...OK
Writing generated\js\app.js...OK
Reading app/js/controllers/auth.coffee...OK
Writing generated\js\controllers\auth.js...OK
Reading app/js/directives/directives.coffee...OK
Writing generated\js\directives\directives.js...OK
Reading app/js/filters/filters.coffee...OK
Writing generated\js\filters\filters.js...OK
Reading app/js/main.coffee...OK
Writing generated\js\main.js...OK
Reading app/js/services/auth.coffee...OK
Writing generated\js\services\auth.js...OK
```