2014-09-30 13:10:53 +02:00
2014-09-30 13:10:53 +02:00
2014-09-30 13:10:53 +02:00
2014-09-30 13:10:53 +02:00
2015-02-08 20:44:32 +07:00
2014-09-30 13:10:53 +02:00
2015-07-24 18:12:51 -07:00
2015-02-15 21:20:19 +01:00
2015-04-08 18:30:26 +07:00

gulp-babel Build Status

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 = require('gulp');
var babel = require('gulp-babel');

gulp.task('default', function () {
	return gulp.src('src/app.js')
		.pipe(babel())
		.pipe(gulp.dest('dist'));
});

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 = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var babel = require('gulp-babel');
var concat = require('gulp-concat');

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

License

MIT © Sindre Sorhus

S
Description
Gulp plugin for Babel
Readme MIT
61 KiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 100%