我使用的是wro4j 1.7.3和减4j/减with编译器。
preProcessors=less4j,
yuiCssMin,googleClosureSimple在我的wro.xml中,我有这样的东西:
<group name='css'>
<css>/resources/css/base.css</css>
</group>编译时,我会得到一个错误,因为wro4j也将我的*..css文件视为*..less文件。
Exception occured while processing: ro.isdc.wro.WroRuntimeException:
Could not compile less. 1 error(s) occured:
ERROR 437:1 missing EOF at '}' in stylesheet (which started at 23:1)
, class: ro.isdc.wro.WroRuntimeException,caused by:
com.github.sommeri.less4j.Less4jException Could not compile less. 1 error(s) occured:
ERROR 437:1 missing EOF at '}' in stylesheet (which started at 23:1)当使用lessCSS而不是less4j时,更好地显示错误原因:
MEZ: [ERROR] Exception occured while processing: ro.isdc.wro.WroRuntimeException: Could
not execute the script because:
{
"type": "Runtime",
"message": "error evaluating function `saturate`: Cannot find function toHSL in object
[object Object].",
"filename": null,
"index": 11114.0,
"line": 754.0,
"callLine": null,
"callExtract": null,
"stack": null,
"column": 17.0,
"extract": [
".img-saturate{ ",
" -webkit-filter: saturate(500%);",
" -moz-filter: saturate(500%);"
]
}, class: ro.isdc.wro.WroRuntimeException,caused by: Could not execute the script
because:
{
"type": "Runtime",
"message": "error evaluating function `saturate`: Cannot find function toHSL in
object [object Object].",
"filename": null,
"index": 11114.0,
"line": 754.0,
"callLine": null,
"callExtract": null,
"stack": null,
"column": 17.0,
"extract": [
".img-saturate{ ",
" -webkit-filter: saturate(500%);",
" -moz-filter: saturate(500%);"
]
}更改处理器顺序无助于:
preProcessors=yuiCssMin,googleClosureSimple
postProcessors=less4j错误仍然存在。
是否有可能,比方说wro4j,它不应该将以css结尾的文件视为较少的文件。
发布于 2014-02-23 11:00:41
谢谢亚历克斯
通过使用less4j.less,较少的处理器只扫描较少的文件:
preProcessors=less4j, yuiCssMin,googleClosureSimple
#postProcessors=less4j然而,后来我发现了错误的真正原因。css文件中缺少一个结束大括号。通过增加支撑,一切都工作得很好!
https://stackoverflow.com/questions/21953836
复制相似问题