const gulp = require('gulp');
const babel = require('gulp-babel');
const sourcemaps = require('gulp-sourcemaps');
const eslint = require('gulp-eslint');
const changed = require('gulp-changed');

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

gulp.task('compile', ['lint'], () => {
  return gulp.src('src/**/*.js')
    //.pipe(changed('lib'))
    .pipe(sourcemaps.init())
    .pipe(babel())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('lib'));
});

gulp.task('watch', () => {
  gulp.watch('src/**/*.js', ['lint', 'compile']);
});

gulp.task('default', ['watch']);

@@ -29,21 +29,23 @@
 ;%0Aconst 
-babel
+changed
  = requi
@@ -57,60 +57,15 @@
 ulp-
-babel');%0Aconst sourcemaps = require('gulp-sourcemaps
+changed
 ');%0A
@@ -106,49 +106,8 @@
 t');
-%0Aconst changed = require('gulp-changed');
 %0A%0Agu
@@ -247,255 +247,8 @@
 t())
-%0A    .pipe(eslint.failAfterError());%0A%7D);%0A%0Agulp.task('compile', %5B'lint'%5D, () =%3E %7B%0A  return gulp.src('src/**/*.js')%0A    //.pipe(changed('lib'))%0A    .pipe(sourcemaps.init())%0A    .pipe(babel())%0A    .pipe(sourcemaps.write())%0A    .pipe(gulp.dest('lib'))
 ;%0A%7D)
@@ -316,19 +316,8 @@
 int'
-, 'compile'
 %5D);%0A
@@ -350,12 +350,20 @@
 %5B'watch'
+, 'lint'
 %5D);%0A

remove babel compile from gulp tasks