Skip to content

Instantly share code, notes, and snippets.

@davidpfahler
Created January 3, 2013 17:45
Show Gist options
  • Select an option

  • Save davidpfahler/4445300 to your computer and use it in GitHub Desktop.

Select an option

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

cowboy commented Jan 3, 2013

Copy link
Copy Markdown

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

cowboy commented Jan 3, 2013

Copy link
Copy Markdown

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

@cowboy

cowboy commented Jan 3, 2013

Copy link
Copy Markdown

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