tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wyraz <michael.wy...@evermind.de>
Subject Tapestry 5.4 - changing built-in js-module versions, using extrnal sources
Date Thu, 07 Nov 2013 14:01:29 GMT
Hi,

today I started working with the new require.js approach and modules 
within T5.4. I have some question which I could not anwser using google 
and the list archives.

1. How would one replace an internal library with a more recent version.
Example: embedded jQuery (which is 1.9 shall be replaces with 1.10).

I did the following which works - but I'm not sure if that is the right way:

         @Contribute(ModuleManager.class)
         public static void setupBaseModules(MappedConfiguration<String,
    Object> configuration,
    @Path("${tapestry.asset.root}/jquery-1.10/jquery.js")
                                             Resource jQuery)
         {
             configuration.override("jquery-library", new
    JavaScriptModuleConfiguration(jQuery));
         }


2. How could I retrieve such "module" assets (especially loaded via 
require.js) from an external source like a CDN?
This is at least possible with require.js: 
https://github.com/requirejs/example-jquery-cdn
But how can I do it with a tapestry module?

Regards,
Michael.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message