Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-18 Thread Sanket Sharma
*enlightenment* :-) On 18 Jun 2014 09:34, "Geoff Callender" wrote: > Not a bug. > If you put actual modules in resources/META-INF/modules/, then they work > fine. > Put non-modules in resources/META-INF/assets/ and make them available as > modules as I showed below by contributing to ModuleManag

Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-18 Thread Geoff Callender
Not a bug. If you put actual modules in resources/META-INF/modules/, then they work fine. Put non-modules in resources/META-INF/assets/ and make them available as modules as I showed below by contributing to ModuleManager. On 18 Jun 2014, at 5:27 pm, Sanket Sharma wrote: > Okay, it works if I

Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-18 Thread Sanket Sharma
Okay, it works if I place my javascript under /META-INF/assets/js Bug? Or does everything have to be under assets? It doesn't seem to pick up resources under META-INF/modules. On Wed, Jun 18, 2014 at 9:11 AM, Sanket Sharma wrote: > > Nope. Doesn't work. I have my javascript files in the projec

Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-18 Thread Geoff Callender
ol.js is not a module, it's an asset. That's why you're shimming it. So instead of putting it in resources/META-INF/modules/, try putting it in resources/META-INF/assets/js/. On 18 Jun 2014, at 5:11 pm, Sanket Sharma wrote: > Nope. Doesn't work. I have my javascript files in the project under

Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-18 Thread Sanket Sharma
Nope. Doesn't work. I have my javascript files in the project under resources resources/META-INF/modules/ol/ol.js Does it map the META-INF/modules to a virtual resource? In your code I'm as suing there is a folder under META-INF called assets/js? If I use @Path("/META-INF/modules/ol/ol.js") corre

Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-17 Thread Geoff Callender
Here's one that worked, producing a module called jquery-ui: public static void contributeModuleManager(MappedConfiguration configuration, @Path("/META-INF/assets/js/jquery-ui-1.9.1.js") Resource jqueryUi) { configuration.add("jquery-ui", new JavaScriptModuleConfiguration(

RequireJS Shim and JavaScriptModuleConfiguration

2014-06-17 Thread Sanket Sharma
Hi, How do I convert a non AMD javascript module to work with require.js? I did some investigate and it seems like shimming is the way to go. I would like to take a javascript file ol.js and shim to to export 'ol'. The file is located under modules and is packaged in META-INF/modules directory in