@Service(value="blJavascriptMinificationService") @ConditionalOnMissingClass(value="com.google.javascript.jscomp.Compiler") public class YUIJavascriptMinificationServiceImpl extends Object implements JavascriptMinificationService
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
disableOptimizations |
protected int |
linebreak |
protected static org.apache.commons.logging.Log |
LOG |
protected boolean |
munge |
protected boolean |
preserveAllSemiColons |
protected boolean |
verbose |
| Constructor and Description |
|---|
YUIJavascriptMinificationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected org.mozilla.javascript.ErrorReporter |
getLogBasedErrorReporter(String filename) |
void |
minifyJs(String filename,
Reader reader,
Writer writer)
Minifies the file in "reader" and writes the minified version to "writer"
|
protected static final org.apache.commons.logging.Log LOG
@Value(value="${minify.linebreak}")
protected int linebreak
@Value(value="${minify.munge}")
protected boolean munge
@Value(value="${minify.verbose}")
protected boolean verbose
@Value(value="${minify.preserveAllSemiColons}")
protected boolean preserveAllSemiColons
@Value(value="${minify.disableOptimizations}")
protected boolean disableOptimizations
public YUIJavascriptMinificationServiceImpl()
public void minifyJs(String filename, Reader reader, Writer writer) throws ResourceMinificationException
JavascriptMinificationServiceminifyJs in interface JavascriptMinificationServicefilename - Name of the file to be minifiedreader - The original filewriter - The writer that the minified version of the file in "reader" will be written toResourceMinificationException - Failure to successfully minify the bytes in "reader"protected org.mozilla.javascript.ErrorReporter getLogBasedErrorReporter(String filename)
Copyright © 2019. All rights reserved.