我正在使用 wro4j 1.7.3 和 less4j/lessCSS 编译器。
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 结尾的文件视为 less。