Class GoogleClosureJavascriptMinificationServiceImpl

java.lang.Object
org.broadleafcommerce.common.resource.service.GoogleClosureJavascriptMinificationServiceImpl
All Implemented Interfaces:
JavascriptMinificationService

@Service("blJavascriptMinificationService") public class GoogleClosureJavascriptMinificationServiceImpl extends Object implements JavascriptMinificationService
Javascript minification service implemented using the Google Closure Compiler This will be used for minification if the Google Closure Compiler dependency is included in the project

This library also supports extra aggressive minification, transpiling, code optimizing, and bundleing

  • minify.closure.compiler.languageIn - Sets ECMAScript version to use for the input.
    Options: ECMASCRIPT3, ECMASCRIPT5, ECMASCRIPT5_STRICT, ECMASCRIPT6_TYPED (experimental), ECMASCRIPT_2015, ECMASCRIPT_2016, ECMASCRIPT_2017, ECMASCRIPT_NEXT
    Default: ECMASCRIPT5
  • minify.closure.compiler.languageOut - Sets ECMAScript version to use for the output.
    Options: ECMASCRIPT3, ECMASCRIPT5, ECMASCRIPT5_STRICT, ECMASCRIPT6_TYPED (experimental), ECMASCRIPT_2015, ECMASCRIPT_2016, ECMASCRIPT_2017, ECMASCRIPT_NEXT, NO_TRANSPILE
    Default: NO_TRANSPILE
  • minify.closure.compiler.warningLevel - Warnings level. Possible values: QUIET, DEFAULT, VERBOSE
    Default: SILENT
Author:
Jay Aisenbrey (cja769)
  • Field Details

    • warningLevel

      @Value("${minify.closure.compiler.warningLevel:QUIET}") protected String warningLevel
    • strictMode

      @Value("${minify.closure.compiler.strictMode:false}") protected Boolean strictMode
    • languageIn

      protected com.google.javascript.jscomp.CompilerOptions.LanguageMode languageIn
    • languageOut

      protected com.google.javascript.jscomp.CompilerOptions.LanguageMode languageOut
  • Constructor Details

    • GoogleClosureJavascriptMinificationServiceImpl

      public GoogleClosureJavascriptMinificationServiceImpl(@Value("${minify.closure.compiler.languageIn:ECMASCRIPT5}") String compilerLanguageIn, @Value("${minify.closure.compiler.languageOut:NO_TRANSPILE}") String compilerLanguageOut)
  • Method Details