org.apache.myfaces.buildtools.maven2.plugin.javascript.jmt.compress
Class ShrinksafeCompressor
java.lang.Object
org.apache.myfaces.buildtools.maven2.plugin.javascript.jmt.compress.ShrinksafeCompressor
- All Implemented Interfaces:
- JSCompressor
public class ShrinksafeCompressor
- extends Object
- implements JSCompressor
A JS compressor that uses Dojo modified Rhino engine to compress the script.
The resulting compressed-js is garanteed to be functionaly equivalent as this
is the internal view of the rhino context.
- Author:
- nicolas De Loof
Method Summary |
void |
compress(File input,
File compressed,
int level,
int language)
Compress the input script file into the output file (may be same). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShrinksafeCompressor
public ShrinksafeCompressor()
compress
public void compress(File input,
File compressed,
int level,
int language)
throws CompressionException
- Compress the input script file into the output file (may be same).
- Specified by:
compress
in interface JSCompressor
- Parameters:
input
- source to get compressedcompressed
- compressed scriptlevel
- optimization level from 0 to 9. May have various
signification dependending on the compressor, from beeing ignored to some
fine tweaking the output.language
- version of javascript to be used ("130" for JS 1.3), as
defined by Mozilla Rhino engine
- Throws:
CompressionException
- any error during compression- See Also:
org.apache.myfaces.buildtools.maven2.plugin.javascript.jmt.compress.mojo.javascript.compress.JSCompressor#compress(java.io.File,
java.io.File, int, int)
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.