I am unable to import a .less file into another one. I get a "file not found" exception, although I triple checked the path and syntax were right.
Here is how I try to import the file from within my importingFileName.less
:
@import 'main';
Here is how I set the resources in my ApplicationResources.groovy
modules = {
application {
resource url: 'js/libs/jquery-1.7.2.min.js', disposition: 'head'
resource url: 'js/libs/jquery-ui-1.8.20.custom.min.js', disposition: 'head'
resource url: 'js/libs/jquery.form.js', disposition: 'head'
resource url: 'js/application.js', disposition: 'head'
}
css {
resource url: 'css/mobile.css'
resource url: [dir: 'less', file: 'importingFileName.less'], attrs:[rel: 'stylesheet/less', type:'css']
}
}
Here is how I call the resource from the GSPs:
<r:require modules="application, css"/>
Here is what I get:
ERROR resourceMappers.LesscssResourceMapper - error compiling less file:
/home/userPath/.grails/2.0.3/projects/myApp/tomcat/work/Tomcat/localhost/_/grails-
resources/less/importingFileName.less
Message: Couldn't load main.less
If I bundle everything into the importingFileName.less
file, the CSS is loaded correctly using those settings.
Any suggestion is most welcome.