Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The simplest way to apply a processor only on a limited set of resources is to use ExtensionsAwareProcessorDecorator, example:</p> <pre><code>ExtensionsAwareProcessorDecorator.decorate(new LessCssProcessor()).addExtension("less"); </code></pre> <p>The decorated processor should be used instead of LessCssProcessor and it will process only resources having less extension (example: style.less) and will ignore anything else. </p> <p>The same thing can be achieved using a configuration convention, example:</p> <pre><code>preProcessors=lessCss.less </code></pre> <p>Notice that the alias of the processor hass ".less" suffix, meaning that it will be applied only on resources having less extension.</p> <p>If you need something more elaborate, there is another decorator available called PathPatternProcessorDecorator. Usage example:</p> <pre><code>String[] patterns = new String[] {"/a/**/n?me.css", "*.less", "/less/*.css"} PathPatternProcessorDecorator.include(new LessCssProcessor(), patterns); </code></pre> <p>The above example creates a decorated processor which is applied only when a resource matches to one of the provided patterns. A similar approach can be used if you need to exclude patterns:</p> <pre><code>String[] patterns = new String[] {"*.css", "/script/*.js"} PathPatternProcessorDecorator.exclude(new LessCssProcessor(), patterns); </code></pre> <p>In this case the processor will not be applied if the resource matches any of the provided patterns.</p> <p>If none of the existing implementations is good enough, you could implement your own processor decorator which applies or not the processing in a custom way.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload