There's a naming convention for where modules should be placed on the
classpath. If you can follow the naming convention, then there's no need to
contribute the modules.

Modules should be placed in the folder META-INF/modules on the classpath.
 If your module name is "foo/bar" then the you will likely store it in your
workspace as src/main/resources/META-INF/modules/foo/bar.js

Soon, we'll support on-the-fly compilation from CoffeeScript to JavaScript.
This will be an optional feature, so the t5/core modules are compiled at
build time (which is a valid, but somewhat unwieldy, option).

Also, there's a shift in 5.4 from allowing assets (which is to say,
server-side resources that can be downloaded to the client) all over the
place to being in a specific place: META-INF/assets/<libname>.  By 5.5 or
5.6, assets will only be allowed in META-INF/assets/, all other locations
will be disallowed (sealing up a possible security hole, and simplifying a
chunk of the framework's routing logic for assets).

If you do make a contribution to the ModuleManager service, that's an
override. Overrides ARE allowed to be anywhere on the classpath. Since we
don't know at page construction time which modules will be needed by the
page (especially true given all the possibilities of partial page renders
via Ajax requests), the RequireJS configuration block includes details for
all overrides.

Given that you are contributing shims, you will likely have to live with
the contributions, unless you can rewrite your shims into proper modules.

On Fri, Jan 25, 2013 at 7:41 AM, Emmanuel DEMEY <demey.emman...@gmail.com>wrote:

> Hi Everyone
>
> I am working on the migration of tapestry5-jQuery, and I have one question
> about the new JavaScript layer.
>
> I have declared few RequireJS modules in my jQueryModule class (
>
> https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/java/org/got5/tapestry5/jquery/services/JQueryModule.java
> ).
> And we will find these modules in the requirejs.config object in the
> generated HTML. Event if we do not use these modules in the page. Is it
> normal ? Can we include these modules just if they are used in the page ?
>
> I think it can be possible only for modules loaded on the server-side
> (javascriptSupport.require(...)). But for those defined on the client side,
> I do not how we can do that.
>
> Manu
>
>
>
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emman...@gmail.com
> http://emmanueldemey.fr/
>
> Twitter : @EmmanuelDemey
>



-- 
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

Reply via email to