This package has been deprecated

Author message:

Renamed to gulp-babel

gulp-6to5

3.0.0 • Public • Published

gulp-6to5 Build Status

Turn ES6 code into vanilla ES5 with no runtime required using 6to5

Issues with the output should be reported on the 6to5 issue tracker.

Install

$ npm install --save-dev gulp-6to5

Usage

var gulp = require('gulp');
var to5 = require('gulp-6to5');
 
gulp.task('default', function () {
    return gulp.src('src/app.js')
        .pipe(to5())
        .pipe(gulp.dest('dist'));
});

API

6to5(options)

options

See the 6to5 options, except for sourceMap and filename which is handled for you.

Source Maps

Use gulp-sourcemaps like this:

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

License

MIT © Sindre Sorhus

/gulp-6to5/

    Package Sidebar

    Install

    npm i gulp-6to5

    Weekly Downloads

    36

    Version

    3.0.0

    License

    MIT

    Last publish

    Collaborators

    • sindresorhus