The compiler adds attributes to the options object on the first pass; follow-on passes are not decorated with the '__extend()' and other functions coffeescript adds to the top of each generated javascript file. This makes sense when compiling a long list of javascript files into a single file, but grunt-coffee compiles each file into its javascript equivalent at the target end.
This patch gives a fresh clone of the options object passed from the user's grunt.js configuration file to each call to coffee.compile(), thus eliminating this problem.
The compiler adds attributes to the options object on the first pass; follow-on passes are not decorated with the '__extend()' and other functions coffeescript adds to the top of each generated javascript file. This makes sense when compiling a long list of javascript files into a single file, but grunt-coffee compiles each file into its javascript equivalent at the target end.
This patch gives a fresh clone of the options object passed from the user's grunt.js configuration file to each call to coffee.compile(), thus eliminating this problem.