grails-lesscss
grails-lesscss copied to clipboard
Dev mode LESS script not found when resources plugin not installed
If the calling app does NOT have the Resources plugin installed (note it is not a declared dependency nor is mentioned in the documentation), then the scripts taglib <less:scripts /> does not include the appropriate contentPath when generating the path to the LESS JS script file (it is empty). I suggest providing an optional contextPath attribute to allow users to specify this value as well as mentioning this caveat in the README.md file.
Hi nickdos, thanks for raising this. Please provide a pull request for your suggestion and I'll integrate it into the code base.
Please note that I now more and more suggest people to use the official Grails resources plugin, along with the lesscss module.
You may also have found an incompatibility with more recent versions of Grails, as I've never had the need to include the Resources plugin in my projects and it worked very well. I have not used Grails for a while and thus the development of this plugin has pretty much staled.
Yes, it probably is an issue with the latest Grails, as I was was using version 2.2.0, which by default includes the resources plugin when you create a new app (in the plugins section of BuildConfig.groovy), suggesting some functionality has been moved into the plugin(?). I ended up adding the Resources plugin back into my project as the fix.
You can close this issue as "won't fix" if you like - just having this discussion archived may be enough for someone else encountering the issue.
I did initially look at the lesscss module you mentioned, but I couldn't work out how to make it work - the documentation is poor and assumes a certain amount of knowledge of the Resources plugin (e.g. the README mentions adding a style block but fails to tell you where this code should be added). This plugin seemed far more straight forward. I did however have to hack the plugin to get it to work with the latest version of Bootstrap by swapping in a newer version of the LESS JS script (version 1.3.3). I see there is already an issue for this and I think a pull request for it.