import gulp from 'gulp';
import del from 'del';
import eslint from 'gulp-eslint';
import babel from 'gulp-babel';
import mocha from 'gulp-mocha';
import istanbul from 'gulp-istanbul';


gulp.task('clean', () => del(['lib/', 'test/']));

gulp.task('lint', () => {
  return gulp.src('src/**/*.js')
    .pipe(eslint())
    .pipe(eslint.format())
    .pipe(eslint.failAfterError());
});

gulp.task('build', ['clean'], () => {
  return gulp.src('src/lib/**/*.js')
    .pipe(babel())
    .pipe(gulp.dest('lib'));
});

gulp.task('build:test', ['build'], () => {
  return gulp.src('src/test/**/*.js')
    .pipe(babel())
    .pipe(gulp.dest('test'));
});

gulp.task('pre-test', ['build:test'], () => {
  return gulp.src(['lib/**/*.js'])
    .pipe(istanbul())
    .pipe(istanbul.hookRequire());
});

gulp.task('test', ['pre-test'], () => {
  return gulp.src(['test/**/*.js'])
    .pipe(mocha())
    .pipe(istanbul.writeReports())
});

gulp.task('default', ['lint', 'test']);

@@ -913,16 +913,87 @@
 orts())%0A
+    .pipe(istanbul.enforceThresholds(%7B thresholds: %7B global: 50 %7D %7D));%0A
 %7D);%0A%0Agul

Set thresholds