-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (35 loc) · 1 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
const gulp = require("gulp");
const sass = require("gulp-sass");
const del = require("del");
gulp.task("sassCompile", function() {
return gulp
.src("./_includes/sass/*.scss")
.pipe(sass({ outputStyle: "compressed" }).on("error", sass.logError))
.pipe(gulp.dest("./dist/css"));
});
gulp.task("feather", function() {
return gulp
.src("./node_modules/feather-icons/dist/**")
.pipe(gulp.dest("./dist/icons"));
});
gulp.task("assets", () => {
return gulp
.src("./assets/**", { allowEmpty: true })
.pipe(gulp.dest("./dist"));
});
gulp.task("jquery", () => {
return gulp
.src("./node_modules/jquery/dist/jquery.min.js")
.pipe(gulp.dest("./dist"));
});
gulp.task("del", () => {
return del("dist/**", { force: true });
});
gulp.task("build", gulp.series("sassCompile", "feather", "assets", "jquery"));
gulp.task("clean", gulp.series("del", "build"));
gulp.task("default", function() {
gulp.watch(
["./_includes/sass/**/*.scss", "./assets/**"],
gulp.series("build")
);
});