I have the following code in my gulpfile
gulp.task('scripts', function () { gulp.src(paths.browserify) .pipe(browserify()) .pipe(gulp.dest('./build/js')) .pipe(refresh(server)); }); gulp.task('lint', function () { gulp.src(paths.js) .pipe(jshint()) .pipe(jshint.reporter(stylish)); }); gulp.task('nodemon', function () { nodemon({ script: 'app.js' }); });
I need to run lint scripts and tasks when restarting Nodemon. I have the following
gulp.task('nodemon', function () { nodemon({ script: 'app.js' }).on('restart', function () { gulp.run(['scripts', 'lint']); }); });
Gulp.run () is now deprecated, so how could I achieve higher using gulp and best practices?
Tyronemichael
source share