public final class BaseTranspiler extends java.lang.Object implements Transpiler
Modifier and Type | Class and Description |
---|---|
static class |
BaseTranspiler.CompileResult
The source together with the additional compilation results.
|
static class |
BaseTranspiler.CompilerSupplier
Wraps the Compiler into a more relevant interface, making it
easy to test the Transpiler without depending on implementation
details of the Compiler itself.
|
static class |
BaseTranspiler.EsmToCjsCompilerSupplier
CompilerSupplier that only transforms EcmaScript Modules into a form that can be saftely
transformed on a file by file basis and concatenated.
|
Modifier and Type | Field and Description |
---|---|
static BaseTranspiler |
ES_MODULE_TO_CJS_TRANSPILER |
static BaseTranspiler |
ES5_TRANSPILER |
NULL
Modifier and Type | Method and Description |
---|---|
java.lang.String |
runtime()
Returns any necessary runtime code as a string.
|
TranspileResult |
transpile(java.net.URI path,
java.lang.String code)
Transforms the given chunk of code.
|
public static final BaseTranspiler ES5_TRANSPILER
public static final BaseTranspiler ES_MODULE_TO_CJS_TRANSPILER
public TranspileResult transpile(java.net.URI path, java.lang.String code)
Transpiler
transpile
in interface Transpiler
public java.lang.String runtime()
Transpiler
runtime
in interface Transpiler
Copyright © 2009-2018 Google. All Rights Reserved.