RhinoLessCssProcessor with LessCssFilter?

140 views
Skip to first unread message

Brian Nørremark

unread,
Jan 22, 2014, 8:14:11 AM1/22/14
to wr...@googlegroups.com
Hi all,

I am trying to use CoffeeScriptFilter and LessCssFilter. It works fine for CoffeeScript, but LESS only works with files without imports.  If I define groups and use WroFilter, everything works, but for deployment reasons, I would like the .less/coffee-files to stay in the same location.

Any good advice?

Config
INFO  [WrapperSimpleAppMain] [WroFilter] wro4j configuration: ro.isdc.wro.config.jmx.WroConfiguration@2dd06f21[
  cacheUpdatePeriod=0
  modelUpdatePeriod=0
  resourceWatcherUpdatePeriod=0
  gzipEnabled=false
  debug=true
  ignoreMissingResources=false
  disableCache=true
  cacheGzippedContent=false
  jmxEnabled=true
  wroManagerClassName=ro.isdc.wro.extensions.manager.ExtensionsConfigurableWroManagerFactory
  encoding=UTF-8
  mbeanName=DesktopWroFilter
  header=<null>
  connectionTimeout=2000
  parallelPreprocessing=false
  ignoreEmptyGroup=true
  ignoreFailingProcessor=false
]

Error
WARN  [RhinoLessCssProcessor] Exception while applying RhinoLessCssProcessor processor on the  resource, no processing applied...
ro.isdc.wro.WroRuntimeException: Could not execute the script because:
{
  "type": "Syntax",
  "message": "Couldn't load undefined../ext/bootstrap-3.0.3/less/variables.less(0)",
  "filename": null,
  "index": null,
  "line": null,
  "callLine": null,
  "callExtract": null,
  "stack": null,
  "column": -1.0,
  "extract": [
    null,
    null,
    "@import \"../ext/bootstrap-3.0.3/less/variables.less\";"
  ]
}

Alex Objelean

unread,
Jan 22, 2014, 9:09:19 AM1/22/14
to wr...@googlegroups.com
You could try adding the lessCssImport preprocessor. Also, replace the rhinoLessCss processor with less4j processor. 
Another possible improvement is to upgrade to latest version of wro4j (1.7.2). 

Let me know if it works for you.

Cheers,
Alex


--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wro4j+un...@googlegroups.com.
To post to this group, send email to wr...@googlegroups.com.
Visit this group at http://groups.google.com/group/wro4j.
For more options, visit https://groups.google.com/groups/opt_out.

Alex Objelean

unread,
Jan 23, 2014, 10:19:53 AM1/23/14
to wr...@googlegroups.com
I'm not sure I answered your question properly. 
You mentioned that you want to use LessCssFilter. This filter does nothing else but applies he LessCssProcessor on requested resource. It cannot process imports, since there is no processor handling import statement and no way to identify the relative resources referenced by import statement.
In order to correctly apply import processing, use WroFilter which perform more than just one processing. It will apply the configured list of pre & post processors. Do not forget to add the processors you are interested in (more specifically: lessCssImport and less4j processor).

Cheers,
Alex
Reply all
Reply to author
Forward
0 new messages