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.AbstractCommandLineRunner

        com.google.javascript.jscomp.AbstractCommandLineRunner.CommandLineConfig, com.google.javascript.jscomp.AbstractCommandLineRunner.FlagEntry<T extends java.lang.Object>, com.google.javascript.jscomp.AbstractCommandLineRunner.FlagUsageException, com.google.javascript.jscomp.AbstractCommandLineRunner.JsModuleSpec, 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

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

        createInputs, createInputs, createInputs, doRun, filenameToOutputStream, getBuiltinExterns, getCommandLineConfig, getCompiler, getDiagnosticGroups, getErrorPrintStream, isInTestMode, parseJsonFilesFromInputStream, removeDuplicateZipEntries, run, setExitCodeReceiver, setRunOptions, setWarningGuardOptions
      • 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()