Skip to content

Instantly share code, notes, and snippets.

@davidpfahler
Created January 3, 2013 17:45
Show Gist options
  • Save davidpfahler/4445300 to your computer and use it in GitHub Desktop.
Save davidpfahler/4445300 to your computer and use it in GitHub Desktop.
coffee:
modules:
files:
src: ["src/**/*.coffee"]
dest: '.'
expand: true
rename: (destBase, destPath) -> destBase + destPath.replace(/\.coffee$/, '.js')
@cowboy
Copy link

cowboy commented Jan 3, 2013

IIRC, because destBase is the value you specified for dest, grunt is just concatenating that value with the source path, generating a filename like .src/foo.js. You should specify a dest ending with / or use Node's path.join() to join path parts.

@cowboy
Copy link

cowboy commented Jan 3, 2013

I'm in the process of committing a change to grunt that will show generated src/dest mappings when --verbose is used.

@cowboy
Copy link

cowboy commented Jan 3, 2013

Ok, see if this commit helps you debug:

gruntjs/grunt@cfd0e35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment