开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜