Package com.xpn.xwiki.web.sx
Class JsExtension.JsCompressor
- java.lang.Object
-
- com.xpn.xwiki.web.sx.JsExtension.JsCompressor
-
- All Implemented Interfaces:
SxCompressor
- Enclosing class:
- JsExtension
public static class JsExtension.JsCompressor extends Object implements SxCompressor
The JavaScript compressor returned byJsExtension.getCompressor()
. Currently implemented using Closure Compiler.
-
-
Constructor Summary
Constructors Constructor Description JsCompressor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
compress(String source)
Compresses the given script, making it smaller and less readable, but with the same behavior.String
getSourceMap()
-
-
-
Method Detail
-
compress
public String compress(String source)
Description copied from interface:SxCompressor
Compresses the given script, making it smaller and less readable, but with the same behavior.- Specified by:
compress
in interfaceSxCompressor
- Parameters:
source
- The uncompressed script- Returns:
- A compressed version of the input source
-
getSourceMap
public String getSourceMap()
- Returns:
- the last source map that was created by this compressor
-
-