Package com.iizix.js.build.compressors
Class YuiCssCompressor
- java.lang.Object
- com.iizix.js.build.compressors.YuiCssCompressor
- All Implemented Interfaces:
Compressor
public class YuiCssCompressor extends java.lang.Object implements Compressor
Basic CSS compressor implementation using Yahoo YUI Compressor that could be used byHtmlCompressor
for inline CSS compression.
Constructor Summary
Constructors Constructor Description YuiCssCompressor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
compress(java.lang.String source)
The main method that compresses the given source and returns a compressed result.int
getLineBreak()
Returns number of symbols per line Yahoo YUI Compressor will use during CSS compression.void
setLineBreak(int lineBreak)
Tells Yahoo YUI Compressor to break lines after the specified number of symbols during CSS compression.
Method Detail
compress
public java.lang.String compress(java.lang.String source)
Description copied from interface:Compressor
The main method that compresses the given source and returns a compressed result.- Specified by:
compress
in interfaceCompressor
- Parameters:
source
- The source to compress.- Returns:
- Compressed result.
getLineBreak
public int getLineBreak()
Returns number of symbols per line Yahoo YUI Compressor will use during CSS compression. This corresponds to--line-break
command line option.- Returns:
line-break
parameter value used for CSS compression.- See Also:
- Yahoo YUI Compressor
setLineBreak
public void setLineBreak(int lineBreak)
Tells Yahoo YUI Compressor to break lines after the specified number of symbols during CSS compression. This corresponds to--line-break
command line option. This option has effect only if CSS compression is enabled. Default is-1
to disable line breaks.- Parameters:
lineBreak
- set number of symbols per line- See Also:
- Yahoo YUI Compressor