A require.js processor. Please note this processor should be off during development. You must follow these steps for making it work:
1. Configure a fallback group.
{@code wro.xml:With this, wro will see all your *.js files during development (mode=dev)./js/*.js ...}
2. Configure a require.js group
{@code wro.xml:Here is where you define a wro group that will be processed by require.js. Remember you just need to add the 'AMD' module that will load all the dependencies (e.g. 'home'). Require.js will trace all the dependencies of 'home' and bundle them all together./js/home.js ...}
3. Configure a build profile to instruct require.js how to build. The processor can use custom build profiles if you store them in a "/build" directory inside your web context.
src/main/webapp/build/build.js: ({ paths: { "underscore": "empty:", "backbone": "empty:", "mustache": "empty:", "jquery": "empty:", "jqueryUI": "js/libs/jquery-ui-1.8.18.custom" } })Please note that path are resolved using the web context (e.g. "/").
Build profile precedence:
|
|