const gulp        = require('gulp');
const babel       = require('gulp-babel');
const nodemon     = require('gulp-nodemon');

// https://gist.github.com/just-boris/89ee7c1829e87e2db04c
function wrapPipe(taskFn) {
    return function(done) {
        var onSuccess = function() {
            done();
        };
        var onError = function(err) {
            done(err);
        };
        var outStream = taskFn(onSuccess, onError);
        if (outStream && typeof outStream.on === 'function') {
            outStream.on('end', onSuccess);
        }
    };
}

gulp.task('default', function() { // (D)
    gulp.watch('src/**/*.js', ['build']);
});

gulp.task('build', wrapPipe(function(success, error) {
    return gulp.src('src/**/*.js')
        .pipe(babel().on('error', error))
        .pipe(gulp.dest('dist'));
}));

gulp.task('nodemon', () => {
    return nodemon({
        script: 'dist/index.js',
        watch: [ 'dist' ]
    });
});

gulp.task('develop', ['default', 'nodemon']);

@@ -578,27 +578,51 @@
 t', 
-function() %7B // (D)
+%5B 'nodemon' %5D);%0A%0Agulp.task('watch', () =%3E %7B
 %0A   
@@ -649,23 +649,25 @@
 *.js', %5B
+ 
 'build'
+ 
 %5D);%0A%7D);%0A
@@ -695,24 +695,16 @@
 rapPipe(
-function
 (success
@@ -711,16 +711,19 @@
 , error)
+ =%3E
  %7B%0A    r
@@ -935,20 +935,47 @@
 tch: %5B '
-dist
+src' %5D,%0A        tasks: %5B 'build
 ' %5D%0A    

update gulp file