V
V
Vyacheslav Lebedev2015-04-19 21:57:06
JavaScript
Vyacheslav Lebedev, 2015-04-19 21:57:06

How to fix the problem with closing function body ';' on coffeescript or something else?

Good evening!
I am using the zeptojs library.
As I noticed, each individual module starts with the lines:
;(function() {})
And the last one does not contain a closing ;, which causes problems when building all js.
43580d90f91f46e082a6a8f10b73f206.png
I write in coffeescript, the compiler perceives such code as if there is no ;.
;(function () {})== ->
How to fix this situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Shatokhin, 2015-04-19
@slavikse

Swears, because. two brackets ") (" in a row. In JS, this means a function call and a line break is not taken into account. Specify a separator for the "compiler".
Lately, it's fashionable to start modules not with ";", but with "!". An anonymous function will still be executed, despite to denial.
!(function () {})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question