You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
687 B
35 lines
687 B
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
|
|
};
|
|
|
|
|