-
e6ify::runtime
-
The traceur runtime exposed here so it can be included in the bundle via:
browserify.add(es6ify.runtime)
The runtime is quite large and not needed for all ES6 features and therefore not added to the bundle by default. See this comment for details.
- Source:
-
es6ify::traceurOverrides
-
Allows to override traceur compiler defaults.
In order to support async functions (
async
/await
) do:es6ify.traceurOverrides = { asyncFunctions: true }
- Source:
-
es6ify() → {function}
-
The es6ify transform to be used with browserify.
Example
browserify().transform(es6ify)
Returns:
function that returns a
TransformStream
when called with afile
- Type
- function
-
es6ify::compileFile(file, src) → {string}
-
Compile function, exposed to be used from other libraries, not needed when using es6ify as a transform.
Parameters:
Name Type Description file
string name of the file that is being compiled to ES5
src
string source of the file being compiled to ES5
Returns:
compiled source
- Type
- string
-
es6ify::configure(filePattern) → {function}
-
Configurable es6ify transform function that allows specifying the
filePattern
of files to be compiled.Parameters:
Name Type Argument Description filePattern
string <optional>
(default: `/.js$/) pattern of files that will be es6ified
- Source:
Returns:
function that returns a
TransformStream
when called with afile
- Type
- function