Search code examples
javascriptgrailsyui3

Grails 2 resources and yui3 script loader


I would like to use yui3 with a grails 2 web application but the new way that grails 2 handles resources is starting to annoy me.

yui3 seems to have the path right when is loads the js files, i.e. ../static/js/yui3/node-menunav/node-menunav-min.js but all I get is 404 errors when it tries to load dependencies.

How do I bypass the resources plugin for js or should I turn of the resources plugin altogether, as it seems a lot of work for not much gain.

And yes I know there is a plugin but it's just JavaScript and doesn't need a plugin and I'm trying to keep the plugin usage to a minimum.


Solution

  • Either comment the line above in your BuildConfig.groovy:

    • runtime ":resources:1.1.5"

    Or include your js in your ApplicationResources.groovy.