CoffeeScript --bare function changed?
The parameter --bare
in CoffeeScript has been changed. Does anyone know what new parameter开发者_JAVA百科 does the same function?
By default, when coffee-script compiles a file, it wraps the result using a "self-invoking anonymous function" like so:
(function() {
// compiled code here...
}).call(this);
You can find more reference about this here: http://2007-2010.lovemikeg.com/2008/08/17/a-week-in-javascript-patterns-self-invocation/
The --bare flags prevent this wrapping from happening.
精彩评论