(inteligent) use of arrow functions
This commit is contained in:
parent
9b006bb4bf
commit
98acd2310f
22
gulpfile.js
22
gulpfile.js
|
@ -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()
|
||||
|
|
Reference in a new issue