public interface Transpiler
There are a number of considerations when implementing this interface. Specifically,
BaseTranspiler
accepting a CompilerSupplier
.
TranspileResult
, which is able to
return any combination of embedded or external source map.
sourceURL
, handling of goog.module
,
or other postprocessing, such as wrapping the script in eval
.
This is left to other collaborators.
CachingTranspiler
that
decorates an existing Transpiler
with caching behavior.
Modifier and Type | Field and Description |
---|---|
static Transpiler |
NULL
Null implementation that does no transpilation at all.
|
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.
|
static final Transpiler NULL
TranspileResult transpile(java.net.URI path, java.lang.String code)
java.lang.String runtime()
Copyright © 2009-2019 Google. All Rights Reserved.