English 中文(简体)
圣杯 - 失去的CES CSS @ 进口问题@ import issue
原标题:Grails - LESS CSS @import issue

我无法将. less 文件导入到另一个文件 。 我得到了一个“ 未找到文件” 的例外, 尽管我检查了三次路径, 语法是正确的 。

以下是我如何尝试从 导入文件夹Name.less 中导入文件 :

@import  main ;

以下是我如何在我的应用程序资源中设置资源的方式。 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 ]
    }
}

以下是我如何称呼普惠制资源:

<r:require modules="application, css"/>

这就是我得到的:

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.

问题回答

单引号可能造成问题, 取决于您使用的插件的版本 。 见 < a href="https:// github.com/paulfairless/ grails- lesscs-resources/ issues/ 26" rel=“ nofollow" >https:// github.com/paulfairless/ grails- lesscs-resources/ issues/ 26 。

尝试此 :





相关问题
jQuery - ScrollTo and Serial Scroll not working together

I have tested the scrollTo() plugin, but I need a way to stop the scrolling animation, so I am looking at serialScroll(). Here is what I used with scrollTo: $( #scroller ).scrollTo( 1000px , 3000); ...

jQuery deconstructors for plugins?

I m using the Galleria plugin inside an Accordion plugin to display images in a super cool way. A problem occurs, however, when I open up a new tab (in the accordion) then come back to the gallery tab....

XPCOM Security issues

I m developing a Firefox plugin using XPCOM, I ve not yet read all the docs, but as far as I can see, A plugin is simply a DLL that provides services via a XPCOM interface and interacts with the ...

Ruby on Rails plugin development process

I m considering developing aspects of a website as Rails plugins for reuse. My question is about the development process. Since each of these plugins will provide a "slice" of functionality, should ...

help mongrel wont start

I have decided to switch from Restful authentication to authlogic.. so what I did was delete every file and folder that got installed when I downloaded the plugin.. now when I try to "ruby script/...

Basic MEF workflow/usage

I m looking to a framework which will allow me to have a simple plugin system in my .NET application. It seems MEF is the framework which Microsoft is endorsing, and will become part of .NET 4 (it ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

java plugin cache and dynamic IP host

I m trying to use Amazon S3 and Amazon Cloudfront CDN to deliver the jar files of my applet application. I m seeing several cache misses of my jars by the java plugin. This is a show-stopper for me, ...

热门标签