Package com.google.javascript.jscomp
Class TranspilationPasses
java.lang.Object
com.google.javascript.jscomp.TranspilationPasses
Provides a single place to manage transpilation passes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEs6ModulePass(PassListBuilder passes, com.google.javascript.jscomp.PreprocessorSymbolTable.CachedInstanceFactory preprocessorTableFactory) static voidaddEs6ModuleToCjsPass(PassListBuilder passes) static voidstatic voidAdds the pass to inject ES2015 polyfills, which goes after the late ES2015 passes.static voidaddTranspilationPasses(PassListBuilder passes, CompilerOptions options) Adds transpilation passes.static void
-
Method Details
-
addEs6ModulePass
public static void addEs6ModulePass(PassListBuilder passes, com.google.javascript.jscomp.PreprocessorSymbolTable.CachedInstanceFactory preprocessorTableFactory) -
addTranspilationRuntimeLibraries
-
addEs6ModuleToCjsPass
-
addEs6RewriteImportPathPass
-
addTranspilationPasses
Adds transpilation passes.Passes added in this method either use
TranspilationPasses.processTranspileor 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
Adds the pass to inject ES2015 polyfills, which goes after the late ES2015 passes.
-