(inteligent) use of arrow functions

master
Simon Bruder 2018-04-24 20:29:54 +00:00
parent 9b006bb4bf
commit 98acd2310f
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
1 changed files with 17 additions and 17 deletions

View File

@ -24,23 +24,23 @@ function htmllintReporter(filepath, issues) {
) )
} }
gulp.task('html', function(){ gulp.task('html', () =>
return gulp.src('src/index.html') gulp.src('src/index.html')
.pipe(htmllint({}, htmllintReporter)) .pipe(htmllint({}, htmllintReporter))
.pipe(gulp.dest('build')) .pipe(gulp.dest('build'))
}) )
gulp.task('css', function(){ gulp.task('css', () =>
return gulp.src('src/less/*.less') gulp.src('src/less/*.less')
.pipe(lesshint()) .pipe(lesshint())
.pipe(lesshint.reporter()) .pipe(lesshint.reporter())
.pipe(less()) .pipe(less())
.pipe(minifyCSS()) .pipe(minifyCSS())
.pipe(gulp.dest('build/css')) .pipe(gulp.dest('build/css'))
}) )
gulp.task('js', function(){ gulp.task('js', () =>
return gulp.src('src/js/*.js') gulp.src('src/js/*.js')
.pipe(eslint()) .pipe(eslint())
.pipe(eslint.format()) .pipe(eslint.format())
.pipe(minify({ .pipe(minify({
@ -50,31 +50,31 @@ gulp.task('js', function(){
} }
})) }))
.pipe(gulp.dest('build/js')) .pipe(gulp.dest('build/js'))
}) )
gulp.task('default', [ 'html', 'css', 'js' ]) gulp.task('default', [ 'html', 'css', 'js' ])
/* DEVELOPMENT */ /* DEVELOPMENT */
gulp.task('browsersync', ['default'], function() { gulp.task('browsersync', ['default'], () =>
browserSync.init({ browserSync.init({
server: "./build" server: "./build"
}) })
}) )
gulp.task('html-watch', ['html'], function (done) { gulp.task('html-watch', ['html'], function (done) {
browserSync.reload() browserSync.reload()
done() done()
}) })
gulp.task('css-watch', ['css'], function (done) { gulp.task('css-watch', ['css'], function (done) {
browserSync.reload() browserSync.reload()
done() done()
}) })
gulp.task('js-watch', ['js'], function (done) { gulp.task('js-watch', ['js'], function (done) {
browserSync.reload() browserSync.reload()
done() done()
}) })
gulp.task('watch', ['browsersync'], function(){ gulp.task('watch', ['browsersync'], function(){