(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(){ 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,17 +50,17 @@ 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()