gulp-babel
Turn ES6 code into vanilla ES5 with no runtime required using babel
Issues with the output should be reported on the babel issue tracker.
Install
$ npm install --save-dev gulp-babel
Usage
var gulp = ;var babel = ; gulp;
API
babel([options])
options
See the babel
options, except for sourceMap
and filename
which is handled for you.
Source Maps
Use gulp-sourcemaps like this:
var gulp = ;var sourcemaps = ;var babel = ;var concat = ; gulp;
Babel Metadata
Files in the stream are annotated with a babel
property, which
contains the metadata from babel.transform()
.
Example
var gulp = ;var babel = ;var through = ; { return through;} gulp
Runtime
If you are attempting to use features such as generators, you will need to pass { optional: ['runtime'] }
to include the babel runtime. Otherwise you will receive the error: regeneratorRuntime is not defined
.
var gulp = ;var babel = ; gulp;
License
MIT © Sindre Sorhus