ds-site/gulpfile.js
2019-11-13 23:40:26 +01:00

22 lines
602 B
JavaScript

const { src, dest, parallel, watch } = require('gulp');
const sass = require('gulp-sass');
const minifyCSS = require('gulp-csso');
const sassFolder = 'Resources/Private/Sass/';
function css() {
return src(sassFolder + 'index.scss')
.pipe(sass({
includePaths: [
'./node_modules/'
]
}).on('error', sass.logError))
.pipe(minifyCSS())
.pipe(dest('Resources/Public/Css/'))
}
exports.css = css;
exports.watch = function () {
watch([sassFolder + '**/*.scss'], {ignoreInitial: false}, css);
};
exports.default = parallel(css);