Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (28 sloc) 691 Bytes
var gulp = require('gulp'),
watch = require('gulp-watch'),
run = require('gulp-run'),
sourcemaps = require('gulp-sourcemaps'),
rename = require('gulp-rename'),
mochify = require('mochify'),
to5 = require('gulp-6to5');
gulp.task('6to5', function() {
return gulp.src('**/*.es6')
.pipe(sourcemaps.init())
.pipe(to5({
experimental: true,
loose: 'all'
}))
.pipe(sourcemaps.write())
.pipe(rename({
extname: '.js'
}))
.pipe(gulp.dest('./'));
});
gulp.task('test', ['6to5'], function() {
mochify('./test.js', {
reporter: 'tap'
}).bundle();
});
gulp.task('default', ['test'], function() {
gulp.watch('**/*.es6', ['test']);
});