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