(inteligent) use of arrow functions

This commit is contained in:
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

View file

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