var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var less = require('gulp-less');
// TASKS
gulp.task('server', gulp.parallel('less'), function() {
browserSync.init({
server: {baseDir: './src/'}
});
gulp.watch('src/**/*.html').on('change', browserSync.reload);
gulp.watch('src/less/**/*.less', gulp.parallel('less'));
});
gulp.task('less', function() {
return gulp.src('./src/less/main.less')
.pipe(less())
.pipe(gulp.dest('./src/css'))
.pipe(browserSync.stream());
});
gulp.task('default', gulp.parallel('server'));