The outer function is a "hygenic wrapper" created by the CoffeeScript compiler. Occasionally, it places a few things that should be local to the individual file inside the function and before the define(). I haven't checked yet whether the Google Closure compiler is smart enough to unwrap these, when they are not necessary.
On Wed, Jan 15, 2014 at 9:54 AM, Daniel Jue <teamp...@gmail.com> wrote: > I don't have input on the question of additional scope, but thanks for > letting us know that the upgrade went pretty smoothly-- I'm eager to use > 5.4 but I can't change right now. > > > On Mon, Jan 13, 2014 at 3:25 PM, Kristian Marinkovic < > kristian.marinko...@gmail.com> wrote: > > > Hi all, > > > > why are tapestry's requirejs modules nested in an anonymous javascript > > function: > > > > (function() { > > define(['jquery'], function($) { > > }) > > }).call(this); > > > > isn't it enough to just write define(...., function() {})? Is there a > > reason for this additional scope? > > > > cheers, > > Kris > > > > > > > > BTW, i just migrated an existing T5.3.7 application to T5.4-beta-2 with > > almost no hassle. i'm really impressed. > > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com