Package com.google.javascript.jscomp
Class TranspilationPasses
- java.lang.Object
-
- com.google.javascript.jscomp.TranspilationPasses
-
public class TranspilationPasses extends java.lang.ObjectProvides a single place to manage transpilation passes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddEarlyOptimizationTranspilationPasses(PassListBuilder passes, CompilerOptions options)Adds transpilation passes that should run at the beginning of the optimization phase.static voidaddEs6ModulePass(PassListBuilder passes, com.google.javascript.jscomp.PreprocessorSymbolTable.CachedInstanceFactory preprocessorTableFactory)static voidaddEs6ModuleToCjsPass(PassListBuilder passes)static voidaddEs6RewriteImportPathPass(PassListBuilder passes)static voidaddPostNormalizationTranspilationPasses(PassListBuilder passes, CompilerOptions options)Adds transpilation passes that should not be run until after normalization has been done.static voidaddRewritePolyfillPass(PassListBuilder passes)Adds the pass to inject ES2015 polyfills, which goes after the late ES2015 passes.static voidaddTranspilationRuntimeLibraries(PassListBuilder passes)
-
-
-
Method Detail
-
addEs6ModulePass
public static void addEs6ModulePass(PassListBuilder passes, com.google.javascript.jscomp.PreprocessorSymbolTable.CachedInstanceFactory preprocessorTableFactory)
-
addTranspilationRuntimeLibraries
public static void addTranspilationRuntimeLibraries(PassListBuilder passes)
-
addEs6ModuleToCjsPass
public static void addEs6ModuleToCjsPass(PassListBuilder passes)
-
addEs6RewriteImportPathPass
public static void addEs6RewriteImportPathPass(PassListBuilder passes)
-
addEarlyOptimizationTranspilationPasses
public static void addEarlyOptimizationTranspilationPasses(PassListBuilder passes, CompilerOptions options)
Adds transpilation passes that should run at the beginning of the optimization phase. Passes added in this method either useTranspilationPasses.processTranspileor early-exit by checking their feature in the script's featureset. So they will only get run if the feature they're responsible for removing exists in the script.
-
addPostNormalizationTranspilationPasses
public static void addPostNormalizationTranspilationPasses(PassListBuilder passes, CompilerOptions options)
Adds transpilation passes that should not be run until after normalization has been done. Passes added in this method either useTranspilationPasses.processTranspileor early-exit by checking their feature in the script's featureset. So they will only get run if the feature they're responsible for removing exists in the script.
-
addRewritePolyfillPass
public static void addRewritePolyfillPass(PassListBuilder passes)
Adds the pass to inject ES2015 polyfills, which goes after the late ES2015 passes.
-
-