TheProjecter / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

CssVariablesProcessor must be before CssUrlRewritingProcessor #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using CssVariablesProcessor to define url's:
@variables { 
    imgDir: resources/global/img/default/; 
} 
The CssUrlRewriting will not apply changes for these because 
CssVariablesProcessor is the last in chain. Put it first, in order to make it 
work correctly for this use-case.

Original issue reported on code.google.com by alex.obj...@gmail.com on 17 Apr 2010 at 9:51

GoogleCodeExporter commented 9 years ago
It now can be configured using ConfigurableWroManagerFactory:

  <filter>
    <filter-name>WebResourceOptimizer</filter-name>
    <filter-class>
      ro.isdc.wro.http.WroFilter
    </filter-class>
    <init-param>
      <param-name>managerFactoryClassName</param-name>
      <param-value>ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory</param-
value>
    </init-param>
    <init-param>
      <param-name>uriLocators</param-name>
      <param-value>servletContext,classpath,url</param-value>
    </init-param>
    <init-param>
      <param-name>preProcessors</param-name>
      <param-value>cssVariables,cssImport,bomStripper</param-value>
    </init-param>
    <init-param>
      <param-name>postProcessors</param-name>
      <param-value>cssMinJawr,jsMin</param-value>
    </init-param>
</filter>

The default configuration of ServletContextAwareWroManagerFactory won't be 
changed, 
because it is a wanted behavior for CssVariablesProcessor, to be able to change 
the 
variables in the scope of all css files, not only inside the a single resource.

Original comment by alex.obj...@gmail.com on 18 Apr 2010 at 9:56