Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch to fix coffeescript's modifying the options object. #8

Merged
merged 1 commit into from
Jul 24, 2012
Merged

Patch to fix coffeescript's modifying the options object. #8

merged 1 commit into from
Jul 24, 2012

Conversation

elfsternberg
Copy link
Contributor

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;
consequential passes are not decorated with the '__extend()' and other
functions.  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().
@avalade
Copy link
Owner

avalade commented Jul 24, 2012

Thanks for the contribution and the catch!

avalade added a commit that referenced this pull request Jul 24, 2012
Patch to fix coffeescript's modifying the options object.
@avalade avalade merged commit cd03804 into avalade:master Jul 24, 2012
@rockwood
Copy link
Contributor

rockwood commented Aug 1, 2012

Would you mind pushing this to npm?

@avalade
Copy link
Owner

avalade commented Aug 7, 2012

Should be out there in version 0.4

@avalade
Copy link
Owner

avalade commented Aug 7, 2012

in version 0.0.4, that is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants