Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultOpts = map[string]interface{}{ "plugins": []interface{}{ []interface{}{"transform-es2015-classes", map[string]interface{}{"loose": false}}, "transform-es2015-object-super", []interface{}{"transform-es2015-modules-commonjs", map[string]interface{}{"loose": false}}, "transform-exponentiation-operator", }, "ast": false, "sourceMaps": false, "babelrc": false, "compact": false, "retainLines": true, "highlightCode": false, } )
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct { Options Options // contains filtered or unexported fields }
A Compiler compiles JavaScript source code (ES5.1 or ES6) into a goja.Program
type Options ¶ added in v0.36.0
type Options struct { CompatibilityMode lib.CompatibilityMode SourceMapLoader func(string) ([]byte, error) Strict bool }
Options are options to the compiler
type Pool ¶ added in v0.34.0
type Pool struct {
// contains filtered or unexported fields
}
Pool is a pool of compilers so it can be used easier in parallel tests as they have their own babel.
Click to show internal directories.
Click to hide internal directories.