@Service(value="blJavascriptMinificationService") public class GoogleClosureJavascriptMinificationServiceImpl extends Object implements JavascriptMinificationService
| Modifier and Type | Field and Description |
|---|---|
protected com.google.javascript.jscomp.CompilerOptions.LanguageMode |
languageIn |
protected com.google.javascript.jscomp.CompilerOptions.LanguageMode |
languageOut |
protected String |
warningLevel |
| Constructor and Description |
|---|
GoogleClosureJavascriptMinificationServiceImpl(String compilerLanguageIn,
String compilerLanguageOut) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
compileJs(com.google.javascript.jscomp.SourceFile input,
String filename) |
protected com.google.javascript.jscomp.Compiler |
getCompiler() |
protected com.google.javascript.jscomp.CompilerOptions |
getCompilerOptions() |
void |
minifyJs(String filename,
Reader reader,
Writer writer)
Minifies the file in "reader" and writes the minified version to "writer"
|
@Value(value="${minify.closure.compiler.warningLevel:QUIET}")
protected String warningLevel
protected com.google.javascript.jscomp.CompilerOptions.LanguageMode languageIn
protected com.google.javascript.jscomp.CompilerOptions.LanguageMode languageOut
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 String compileJs(com.google.javascript.jscomp.SourceFile input, String filename) throws ResourceMinificationException, IOException
protected com.google.javascript.jscomp.Compiler getCompiler()
protected com.google.javascript.jscomp.CompilerOptions getCompilerOptions()
Copyright © 2022. All rights reserved.