-
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
TransformStreamwhen 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 filestring name of the file that is being compiled to ES5
srcstring 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
filePatternof files to be compiled.Parameters:
Name Type Argument Description filePatternstring <optional>
(default: `/.js$/) pattern of files that will be es6ified
- Source:
Returns:
function that returns a
TransformStreamwhen called with afile- Type
- function


