-
Notifications
You must be signed in to change notification settings - Fork 200
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
wrong conversion of IIFE syntax #190
Comments
from #150 foo = function(){
thing();
}(); gets compiled to foo = ->
thing()
() when it should be foo = (->
thing()
)() |
WorkaroundUse this syntax and you're safe in js2coffee // jQuery syntax: (outies)
(function (w,d) {
// your code here
})(window, document); |
now gets converted to: window.foo = do ->
42 |
nice work with the new version, what's the purpose of the "preview" window? did people not like the two-way conversion? |
mostly i felt it was ambiguous—you weren't sure if you were in js->coffee mode or coffee->js mode. moreso, i dont want to encourage the behavior of getting CoffeeScript output and passing it back to js2coffee :) |
converts to:
end braces should be:
)()
The text was updated successfully, but these errors were encountered: