const gulp = require('gulp'); const autoprefixer = require('gulp-autoprefixer'); const cleancss = require('gulp-clean-css'); const csscomb = require('gulp-csscomb'); const rename = require('gulp-rename'); const sass = require('gulp-sass'); let paths = { source: './sass/*.scss', }; const styles = () => { return gulp.src(paths.source) .pipe(sass({outputStyle: 'compact', precision: 10}) .on('error', sass.logError) ) .pipe(autoprefixer()) .pipe(csscomb()) .pipe(cleancss()) .pipe(rename({ suffix: '.min' })) .pipe(gulp.dest('./static/css/')); }; const auto = () => { return gulp.watch(['./**/*.scss'], styles); } module.exports = { styles, default: auto };