Class ClosureCompilerRunner


  • public class ClosureCompilerRunner
    extends com.google.javascript.jscomp.CommandLineRunner
    Class that wraps the Closure compiler. All configuration is done via args parameter that is structured as an array of strings [similar to command line args].
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.javascript.jscomp.CommandLineRunner

        com.google.javascript.jscomp.CommandLineRunner.FormattingOption
      • Nested classes/interfaces inherited from class com.google.javascript.jscomp.AbstractCommandLineRunner

        com.google.javascript.jscomp.AbstractCommandLineRunner.CommandLineConfig, com.google.javascript.jscomp.AbstractCommandLineRunner.FlagEntry<T extends java.lang.Object>, com.google.javascript.jscomp.AbstractCommandLineRunner.JsChunkSpec, com.google.javascript.jscomp.AbstractCommandLineRunner.JsonFileSpec, com.google.javascript.jscomp.AbstractCommandLineRunner.JsSourceType
    • Field Summary

      • Fields inherited from class com.google.javascript.jscomp.CommandLineRunner

        OUTPUT_MARKER, UTF8_BOM_CODE
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int execute()  
      static int runClosureCompiler​(java.lang.String[] args)
      static method that creates a ClosureCompilerRunner and invokes the compiler.
      • Methods inherited from class com.google.javascript.jscomp.CommandLineRunner

        addAllowlistWarningsGuard, appendRuntimeTo, checkModuleName, createCompiler, createExterns, createOptions, findJsFiles, getDefaultExterns, getVersionText, hasErrors, main, prepForBundleAndAppendTo, shouldRunCompiler
      • Methods inherited from class com.google.javascript.jscomp.AbstractCommandLineRunner

        createDefineReplacements, createInputs, createJsModules, doRun, filenameToOutputStream, getBuiltinExterns, getCommandLineConfig, getCompileMetricsRecorder, getCompiler, getDiagnosticGroups, getErrorPrintStream, isInTestMode, parseJsonFilesFromInputStream, parseModuleWrappers, run, setExitCodeReceiver, setRunOptions, setWarningGuardOptions, shouldGenerateMapPerModule
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • runClosureCompiler

        public static int runClosureCompiler​(java.lang.String[] args)
                                      throws java.lang.Exception
        static method that creates a ClosureCompilerRunner and invokes the compiler. This helper is necessary to catch the CmdLineExceptions that may be thrown by the constructor.
        Parameters:
        args -
        Returns:
        Throws:
        java.lang.Exception
      • execute

        public int execute()