forked from IIIT-ECell/website_2019
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
48 lines (43 loc) · 1.23 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"use strict";
let autoprefixer = require("gulp-autoprefixer"),
// cleanCSS = require("gulp-clean-css"),
gulp = require("gulp"),
// htmlmin = require("gulp-htmlmin"),
rmEmptyLines = require("gulp-remove-empty-lines"),
terser = require("gulp-terser");
gulp.task("styles", function() {
return (
gulp
.src("./_site/css/*.css", { base: "./" })
.pipe(
autoprefixer({ browsers: ["last 99 versions"], cascade: false })
)
// .pipe(cleanCSS())
.pipe(gulp.dest("."))
);
});
gulp.task("scripts", function() {
return gulp
.src("./_site/js/*.js", { base: "./" })
.pipe(terser())
.pipe(gulp.dest("."));
});
gulp.task("pages", function() {
return (
gulp
.src("./_site/**/*.html", { base: "./" })
/*
.pipe(
htmlmin({
collapseWhiteSpace: true,
removeComments: true,
collapseInlineTagWhitespace: true,
preserveLineBreaks: true
})
)
*/
.pipe(rmEmptyLines())
.pipe(gulp.dest("."))
);
});
gulp.task("default", gulp.series("styles", "scripts", "pages"));