'use strict';

var gulp = require('gulp');
var sass = require('gulp-sass');
var livereload = require('gulp-livereload');

sass.compiler = require('node-sass');

gulp.task('sass', function () {
    return gulp.src('./sass/**/*.scss')
        .pipe(sass().on('error', sass.logError))
        .pipe(gulp.dest('./css'))

});

gulp.task('liverel', function () {
    return gulp.src(['./**','!./node_modules/**'])
        .pipe(livereload({
            quiet:true
        }))
})

// gulp.task('sass:watch', function () {
//     gulp.watch('./sass/**/*.scss', ['sass']);
// });

gulp.task('watch', function () {
    livereload.listen()
    gulp.watch('./sass/**/*.scss', gulp.series('sass'))
    gulp.watch(['./**','!./node_modules/**'], gulp.series('liverel'))

});
