I remember seeing requireJS handling this case correctly somewhere in its documentation. I don't see any other good way resolving this in T5.4 as of now.
> On Oct 3, 2013, at 12:17 AM, Magnus Kvalheim <mag...@movellas.com> wrote: > > define(["t5/core/dom", "t5/core/events", "jquery", "// > code.jquery.com/ui/1.10.3/jquery-ui.js"], > ... > > That's interesting - loading of scripts directly within a define. Seems > very useful and convenient. > > Thought I might use same approach in some scenarios. > I tried to lookup on documentation of that to see use cases, but seems like > requirejs officially describes the paths and shim configurations as ways to > load non AMD modules. > (In my still limited knowledge) > > > A heads up though. > Looks like requirejs does not guarantee execution order for non AMD > scripts. So according to some sources there is a chance that jqueryui may > execute before jquery in this case. > Look at the "update" and comments in this post: > http://iamnotmyself.com/2012/09/07/getting-started-managing-client-side-scripts-with-require-js/ > > Also I wonder what would happen if there were more modules that depended on > the same jqueryui script..? > >> On Thu, Oct 3, 2013 at 4:40 AM, Lenny Primak <lpri...@hope.nyc.ny.us> wrote: >> >> I tried to do exactly what you are trying to do and that's what >> precipitated the discussion about JQuery and Bootstrap from CDN. >> I have brought back T5.4 zone highlight effect with this: >> >> https://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/resources/META-INF/modules/flowlogix/HighlightEffect.js?name=tapestry-5.4 >> It requires JQueryUI and I just load it from CDN and it works perfectly. >> >>> On Oct 2, 2013, at 7:14 PM, Barry Books <trs...@gmail.com> wrote: >>> >>> When I created the datapicker I also needed the JQuery UI library but it >>> does not appear to be an option in the Tapestry Core. I think many jquery >>> components may need this and without it in the core many modules will >> each >>> end up with their own version. Is there any reason this is not included? >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org