-
Notifications
You must be signed in to change notification settings - Fork 191
/
gulpfile.babel.js
executable file
·73 lines (66 loc) · 2.04 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
"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}"
},
sprites: {
src: "./src/img/sprites/*.svg",
dist: "./dist/img/sprites/",
watch: "./src/img/sprites/*.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",
gulp.parallel(["views", "styles", "scripts", "images", "webp", "sprites", "fonts", "favicons"]),
gulp.parallel("serve"));
export const prod = gulp.series("clean",
gulp.parallel(["views", "styles", "scripts", "images", "webp", "sprites", "fonts", "favicons", "gzip"]));
export default development;