gulp-esnext

Transform next-generation JavaScript to today's JavaScript

gulp-esnext

Transform next-generation JavaScript to today's JavaScript with esnext

Issues with the output should be reported on the esnext issue tracker.

$ npm install --save-dev gulp-esnext
var gulp = require('gulp');
var esnext = require('gulp-esnext');
 
gulp.task('default', function () {
    return gulp.src('src/app.js')
        .pipe(esnext())
        .pipe(gulp.dest('dist'));
});

Options are passed through to esnext.

Use gulp-sourcemaps like this:

var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var esnext = require('gulp-esnext');
var concat = require('gulp-concat');
 
gulp.task('default', function () {
    return gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
        .pipe(esnext())
        .pipe(concat('all.js'))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('dist'));
});

MIT © Sindre Sorhus