2018-10-23 03:40:34 +02:00
|
|
|
const gulp = require("gulp");
|
|
|
|
const rename = require("gulp-rename");
|
|
|
|
const csso = require("gulp-csso");
|
|
|
|
|
2019-04-20 21:56:43 +02:00
|
|
|
gulp.task("minify-css", minifyCSS);
|
2018-10-23 03:40:34 +02:00
|
|
|
gulp.task("watch-css", function() {
|
2020-07-19 06:43:42 +02:00
|
|
|
return gulp.watch(["./src/styles/index.css"], minifyCSS);
|
2018-10-23 03:40:34 +02:00
|
|
|
});
|
|
|
|
|
2019-04-20 21:56:43 +02:00
|
|
|
function minifyCSS() {
|
2020-07-19 06:43:42 +02:00
|
|
|
return gulp.src("./src/styles/index.css")
|
2019-04-20 21:56:43 +02:00
|
|
|
.pipe(csso({restructure: false}))
|
2020-07-19 06:43:42 +02:00
|
|
|
.pipe(rename("style.css"))
|
|
|
|
.pipe(gulp.dest("./dist"));
|
2019-04-20 21:56:43 +02:00
|
|
|
}
|