-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
63 lines (55 loc) · 1.71 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
import { parallel, series } from "gulp"
// Import tasks files
import { sassBuild, sassLint, sassWatch, cssClean } from "./gulp_tasks/styles"
import { jsBuild, jsWatch, jsClean } from "./gulp_tasks/scripts"
import { imgBuild, imgWatch, imgClean } from "./gulp_tasks/images"
import { fontsBuild, fontsWatch, fontsClean } from "./gulp_tasks/fonts"
import syncInit from "./gulp_tasks/sync"
// Styles tasks
exports["styles:build"] = sassBuild
exports["styles:lint"] = sassLint
exports["styles:watch"] = sassWatch
exports["styles:clean"] = cssClean
exports.styles = series(cssClean, sassBuild, sassWatch)
// Scripts tasks
exports["scripts:build"] = jsBuild
exports["scripts:watch"] = jsWatch
exports["scripts:clean"] = jsClean
exports.scripts = series(jsClean, jsBuild, jsWatch)
// Images tasks
exports["images:build"] = imgBuild
exports["images:watch"] = imgWatch
exports["images:clean"] = imgClean
exports.images = series(imgClean, imgBuild, imgWatch)
// Fonts tasks
exports["fonts:build"] = fontsBuild
exports["fonts:watch"] = fontsWatch
exports["fonts:clean"] = fontsClean
exports.fonts = series(fontsClean, fontsBuild, fontsWatch)
// Sync tasks
exports["sync:init"] = syncInit
// Global tasks
exports.clean = parallel(
exports["styles:clean"],
exports["scripts:clean"],
exports["images:clean"],
exports["fonts:clean"],
)
exports.watch = parallel(
exports["styles:watch"],
exports["scripts:watch"],
exports["images:watch"],
exports["fonts:watch"],
)
exports.build = parallel(
exports["styles:build"],
exports["scripts:build"],
exports["images:build"],
exports["fonts:build"],
)
exports.serve = series(
exports.build,
parallel(exports["sync:init"], exports.watch),
)
// Default `gulp`
exports.default = exports.serve