Class TranspilationPasses

java.lang.Object
com.google.javascript.jscomp.TranspilationPasses

public class TranspilationPasses extends Object
Provides a single place to manage transpilation passes.
  • Method Details Link icon

    • addEs6ModulePass Link icon

      public static void addEs6ModulePass(PassListBuilder passes, com.google.javascript.jscomp.PreprocessorSymbolTable.CachedInstanceFactory preprocessorTableFactory)
    • addTranspilationRuntimeLibraries Link icon

      public static void addTranspilationRuntimeLibraries(PassListBuilder passes)
    • addEs6ModuleToCjsPass Link icon

      public static void addEs6ModuleToCjsPass(PassListBuilder passes)
    • addEs6RewriteImportPathPass Link icon

      public static void addEs6RewriteImportPathPass(PassListBuilder passes)
    • addTranspilationPasses Link icon

      public static void addTranspilationPasses(PassListBuilder passes, CompilerOptions options)
      Adds transpilation passes.

      Passes added in this method either use TranspilationPasses.processTranspile or early-exit by checking their feature in the script's featureset. So they get run if the feature they're responsible for removing exists in the script.

    • addRewritePolyfillPass Link icon

      public static void addRewritePolyfillPass(PassListBuilder passes)
      Adds the pass to inject ES2015 polyfills, which goes after the late ES2015 passes.