var plugins = require("gulp-load-plugins")();
gulp.task('sass', function() {
gulp.src('./sass/main.sass')
.pipe(plumber())
.pipe(plugins.sourcemaps.init())
.pipe(sass({
includePaths: ['./assets/css/'],
onError: browserSync.notify
}))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: true
}))
// .pipe(uncss({
// html: ['*.html']
// }))
.pipe(plugins.sourcemaps.write("./"))
.pipe(gulp.dest('./dist/css/'))
.pipe(rename({suffix: '.min'}))
.pipe(minifyCss())
.pipe(gulp.dest('./dist/css/'))
.pipe(browserSync.reload({stream:true}));
});