-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
86 lines (74 loc) · 1.74 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
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
85
86
/**
* @module Gulp
* @description Gulp Process
*/
import gulp from 'gulp';
import { cleanAssets, cleanIcons } from './tasks/clean.js';
import { parseIcons } from './tasks/icomoon.js';
import { lintCSS, lintJS } from './tasks/lint.js';
import { minifyCSS, minifyJS } from './tasks/minify.js';
import { compressGZ, compressBR } from './tasks/compress.js';
import { generateServiceWorker } from './tasks/service-worker.js';
import { optimizeImages, convertWebp, convertAvif } from './tasks/images.js';
import { watchCSS, watchJS } from './tasks/watch.js';
/**
* @function clean
* @description Clean Task
*/
export const clean = gulp.series( cleanAssets );
/**
* @function icons
* @description Icon Task
*/
export const icons = gulp.series( cleanIcons, parseIcons );
/**
* @function images
* @description Image Task
*/
export const images = gulp.series( optimizeImages, convertWebp, convertAvif );
/**
* @function lint
* @description Linting Tasks
*/
export const lint = gulp.series( lintCSS, lintJS );
/**
* @function minify
* @description Minify Tasks
*/
export const minify = gulp.series( minifyCSS, minifyJS );
/**
* @function compress
* @description Compress Tasks
*/
export const compress = gulp.series( compressGZ, compressBR );
/**
* @function workers
* @description Worker Tasks
*/
export const workers = gulp.series( generateServiceWorker );
/**
* @function dist
* @description Default task
*/
const dist = gulp.series(
clean,
icons,
lint,
minify,
compress,
workers
);
/**
* @function watch
* @description Watch Task
*/
export const watch = gulp.series(
dist,
gulp.parallel( watchCSS, watchJS )
);
/**
* @function dev
* @description Gulp Dev Tasks
*/
export const dev = gulp.series( watch );
export default dist;