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

Fix for options handling #1

Merged
merged 2 commits into from
Aug 16, 2012
Merged

Fix for options handling #1

merged 2 commits into from
Aug 16, 2012

Conversation

davewasmer
Copy link
Contributor

CoffeeScript modifies the options object that is passed in. Subsequent compile calls with the same options hash result in the closure wrapper and various helper functions being stripped from the source. This is a good idea when concatenating several files together, but for one-off files (the more likely use case for this package), it introduces all kinds of errors.

This patch clones the options object each time so the original options hash is not polluted by the CoffeeScript compiler.

This is the same problem encountered in this pull request for grunt-coffee: avalade/grunt-coffee#8

wdavidw pushed a commit that referenced this pull request Aug 16, 2012
Fix for options handling
@wdavidw wdavidw merged commit 6bc3ae6 into adaltas:master Aug 16, 2012
@wdavidw
Copy link
Member

wdavidw commented Aug 16, 2012

Thanks, i'll publish a new npm version after the merge

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

2 participants