|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectro.isdc.wro.extensions.processor.css.NodeLessCssProcessor
@SupportedResourceType(value=CSS) public class NodeLessCssProcessor
Important node: this processor is not cross platform and has some pre-requesites in order to work.
Same asRhinoLessCssProcessor but uses lessc shell utility to process the less.
Installation instructions: Install the libnode-less package (Unix OS)
sudo apt-get install node-lessIt is possible to test whether the lessc utility is available using
isSupported()
| Field Summary | |
|---|---|
static String |
ALIAS
|
| Constructor Summary | |
|---|---|
NodeLessCssProcessor()
|
|
| Method Summary | |
|---|---|
protected String[] |
getCommandLine(String filePath)
Creates the platform specific arguments to run the lessc shell utility. |
boolean |
isSupported()
|
protected void |
onException(Exception e,
String content)
Invoked when a processing exception occurs. |
void |
process(Reader reader,
Writer writer)
Perform actual resource processing. |
void |
process(Resource resource,
Reader reader,
Writer writer)
Process a content supplied by a reader and perform some sort of processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ALIAS
| Constructor Detail |
|---|
public NodeLessCssProcessor()
| Method Detail |
|---|
public void process(Resource resource,
Reader reader,
Writer writer)
throws IOException
Resource, because
this way you can ignore the other preProcessors from the chain.RuntimeException and the processing chain is interrupted (by default)WroConfiguration.isIgnoreFailingProcessor() is true)
process in interface ResourcePreProcessorresource - the original resource as it found in the model.reader - Reader used to read processed resource content.writer - Writer where used to write processed results.
IOException - when an exception occurs. The future version will change the exception type to Exception, because
any exception may occur during processing. The processing failure will be handled based on value of
WroConfiguration.isIgnoreFailingProcessor() configuration flag.
protected void onException(Exception e,
String content)
WroRuntimeException.
e - the Exception thrown during processingcontent - the resource content being processed.
public void process(Reader reader,
Writer writer)
throws IOException
process in interface ResourcePostProcessorreader - source stream.writer - destination stream.
IOExceptionpublic boolean isSupported()
isSupported in interface SupportAwareprotected String[] getCommandLine(String filePath)
lessc shell utility. Default implementation handles
windows and unix platforms.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||