Hi Dimitris, As you know, Tap 5.4 is using RequireJS as the loader and is configured by creating a var require={} object before the require.js file is loaded. As I am using dojo, it uses a similar mechanism but the variable is called ‘dojoConfig’. The ‘require’ object currently being output by Tap is not used, therefore I want to get rid of it.
I’ll take a look at the module configuration callback API to see if its suitable for my needs. On 8 Feb 2014, at 12:03, Dimitris Zenios <dimitris.zen...@gmail.com> wrote: > Why do you want to get rid of the config?You can add/remove/ovveride the > current config using javascriptSupport.addModuleConfigurationCallback > > > On Sat, Feb 8, 2014 at 12:19 PM, Azudio Developer <d...@azudio.co.uk> wrote: > >> Thanks Dragan. >> >> I've started to knock something up at >> https://github.com/adamhenderson/tapestry-dojo which is my first rough >> stab at getting something working. I've basically just created a module >> that builds >> a new JavaScriptStack containing references to dojo but keeping underscore >> & bootstrap which replaces the 'core' and then created a dojo port (work in >> progress) of the 'dom' module t5-core-dom-dojo.js >> >> I'm currently having trouble getting rid of the require config object that >> gets written out before the libraries are loaded - can't seem to override >> the ModuleManager service. >> >> Regards, >> Adam. >> >> >> On 27 Jan 2014, at 11:05, Dragan Sahpaski <dragan.sahpa...@gmail.com> >> wrote: >> >>> If you want to replace jquery than take a look >>> at >> /tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee >>> [1]. Quoting the part of the doc from the file file "This is the >>> abstraction layer that allows the majority of components to operate >> without >>> caring whether the underlying infrastructure framework is Prototype, >>> jQuery, or something else." >>> >>> This file compiles to: >>> for jquery support: >>> >> /tapestry-core/src/main/generated/compiled-processed-cofeescript/org/apache/tapestry5/ >>> t5-core-dom-jquery.js >>> for prototype support: >>> >> /tapestry-core/src/main/generated/compiled-processed-cofeescript/org/apache/tapestry5/ >>> t5-core-dom-prototype.js >>> (these are generated using the corresponding gradle tasks in >> build.gradle). >>> >>> So for using another javascript provider take a look at >>> JavaScriptModule.java >>> >>> Here's the JavaScriptModule.setupFoundationFramework where the compiled >> and >>> processed js files are used to provide t5/core/dom by contributing to >>> ModuleManager: >>> >>> @Contribute(ModuleManager.class) >>> public static void >> setupFoundationFramework(MappedConfiguration<String, >>> Object> configuration, >>> >>> @Symbol(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER) >>> String provider, >>> >>> @Path("classpath:org/apache/tapestry5/t5-core-dom-prototype.js") >>> Resource domPrototype, >>> >>> @Path("classpath:org/apache/tapestry5/t5-core-dom-jquery.js") >>> Resource domJQuery) >>> { >>> if (provider.equals("prototype")) >>> { >>> configuration.add("t5/core/dom", new >>> JavaScriptModuleConfiguration(domPrototype)); >>> } >>> >>> if (provider.equals("jquery")) >>> { >>> configuration.add("t5/core/dom", new >>> JavaScriptModuleConfiguration(domJQuery)); >>> } >>> >>> // If someone wants to support a different infrastructure, they >>> should set the provider symbol to some other value >>> // and contribute their own version of the t5/core/dom module. >>> } >>> >>> i don't know what else to add, you'll have to figure out as you go >> because >>> I haven't done this so please reply if you have success. >>> >>> I can't comment on replacing requirejs with another AMD loader. >>> >>> [1] >>> >> https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee;h=c76a6fedb9c73b7ab077a1df59bb4e64d8891528;hb=HEAD >>> >>> >>> >>> Cheers, >>> Dragan Sahpaski >>> >>> >>> On Sun, Jan 26, 2014 at 9:18 PM, Thiago H de Paula Figueiredo < >>> thiag...@gmail.com> wrote: >>> >>>> On Thu, 23 Jan 2014 22:35:04 -0200, Azudio Developer <d...@azudio.co.uk> >>>> wrote: >>>> >>>> Hi All, >>>>> >>>> >>>> Hi! >>>> >>>> >>>> I know that Tap 5.4 is still (great) work in progress but I would like >> to >>>>> see a better explanation of the Classes behind all the JavaScript >> handling >>>>> and how it all hangs together. >>>>> >>>> >>>> Any classes or interfaces in particular? >>>> >>>> -- >>>> Thiago H. de Paula Figueiredo >>>> Tapestry, Java and Hibernate consultant and developer >>>> http://machina.com.br >>>> >>>> >>>> --------------------------------------------------------------------- >>>> 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 >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org