23 lines
602 B
JavaScript
23 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);
|