This repository has been archived by the owner on Jun 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
executable file
·84 lines (77 loc) · 2.4 KB
/
gulpfile.babel.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
"use strict";
import gulp from "gulp";
const requireDir = require("require-dir"),
paths = {
views: {
src: [
"./src/views/**/*.html",
"./src/views/pages/*.html"
],
dist: "./dist/",
watch: [
"./src/blocks/**/*.html",
"./src/views/**/*.html"
]
},
styles: {
src: "./src/styles/main.{scss,sass}",
dist: "./dist/styles/",
watch: [
"./src/blocks/**/*.{scss,sass}",
"./src/styles/**/*.{scss,sass}"
]
},
scripts: {
src: "./src/js/index.js",
dist: "./dist/js/",
watch: [
"./src/blocks/**/*.js",
"./src/js/**/*.js"
]
},
images: {
src: [
"./src/img/**/*.{jpg,jpeg,png,gif,tiff,svg}",
"!./src/img/favicon/*.{jpg,jpeg,png,gif,tiff}"
],
dist: "./dist/img/",
watch: "./src/img/**/*.{jpg,jpeg,png,gif,svg,tiff}"
},
webp: {
src: [
"./src/img/**/*.{jpg,jpeg,png,tiff}",
"!./src/img/favicon/*.{jpg,jpeg,png,gif,tiff}"
],
dist: "./dist/img/",
watch: [
"./src/img/**/*.{jpg,jpeg,png,tiff}",
"!./src/img/favicon/*.{jpg,jpeg,png,gif,tiff}"
]
},
sprites: {
src: "./src/img/svg/*.svg",
dist: "./dist/img/sprites/",
watch: "./src/img/svg/*.svg"
},
fonts: {
src: "./src/fonts/**/*.{woff,woff2}",
dist: "./dist/fonts/",
watch: "./src/fonts/**/*.{woff,woff2}"
},
favicons: {
src: "./src/img/favicon/*.{jpg,jpeg,png,gif}",
dist: "./dist/img/favicons/",
},
gzip: {
src: "./src/.htaccess",
dist: "./dist/"
}
};
requireDir("./gulp-tasks/");
export { paths };
export const development = gulp.series("clean", "smart-grid",
gulp.parallel(["views", "styles", "scripts", "images", "webp", "sprites", "fonts", "favicons"]),
gulp.parallel("serve"));
export const prod = gulp.series("clean",
gulp.series(["views", "styles", "scripts", "images", "webp", "sprites", "fonts", "favicons", "gzip"]));
export default development;