-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathgulpfile.js
executable file
·100 lines (81 loc) · 3.24 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* eslint
no-var: 0,
no-multi-spaces: 0,
no-mixed-spaces-and-tabs: 0,
no-multiple-empty-lines: 0
*/
var gulp = require('gulp');
var log = require('fancy-log');
var c = require('ansi-colors');
// utils
var lazyQuire = require('./gulp/core/utils/lazyQuire');
// gulpfile booting message
log(c.green('Starting Gulp! Please wait...'));
/**
* Browser
*/
gulp.task('browser:sync', lazyQuire(require, './gulp/core/recipes/browser-sync'));
/**
* Fonts
*/
gulp.task('fonts:clean', lazyQuire(require, './gulp/core/recipes/fonts/clean'));
gulp.task('fonts:dev', gulp.series('fonts:clean', lazyQuire(require, './gulp/core/recipes/fonts/dev')));
gulp.task('fonts:prod', gulp.series('fonts:clean', lazyQuire(require, './gulp/core/recipes/fonts/prod')));
gulp.task('fonts:watch', gulp.series('fonts:dev', lazyQuire(require, './gulp/core/recipes/fonts/watch')));
/**
* Svgs
*/
gulp.task('svg:clean', lazyQuire(require, './gulp/core/recipes/svg/clean'));
gulp.task('svg:dev', gulp.series('svg:clean', lazyQuire(require, './gulp/core/recipes/svg/dev')));
gulp.task('svg:prod', gulp.series('svg:clean', lazyQuire(require, './gulp/core/recipes/svg/prod')));
gulp.task('svg:watch', gulp.series('svg:dev', lazyQuire(require, './gulp/core/recipes/svg/watch')));
/**
* Svg Sprites
*/
gulp.task('sprite:clean', lazyQuire(require, './gulp/core/recipes/sprite/clean'));
gulp.task('sprite:dev', gulp.series('sprite:clean', lazyQuire(require, './gulp/core/recipes/sprite/dev')));
gulp.task('sprite:prod', gulp.series('sprite:clean', lazyQuire(require, './gulp/core/recipes/sprite/prod')));
gulp.task('sprite:watch', gulp.series('sprite:dev', lazyQuire(require, './gulp/core/recipes/sprite/watch')));
/**
* Images
*/
gulp.task('images:clean', lazyQuire(require, './gulp/core/recipes/images/clean'));
gulp.task('images:dev', gulp.series('images:clean', lazyQuire(require, './gulp/core/recipes/images/dev')));
gulp.task('images:prod', gulp.series('images:clean', lazyQuire(require, './gulp/core/recipes/images/prod')));
gulp.task('images:watch', gulp.series('images:dev', lazyQuire(require, './gulp/core/recipes/images/watch')));
/**
* Scripts
*/
gulp.task('scripts:clean', lazyQuire(require, './gulp/core/recipes/scripts/clean'));
gulp.task('scripts:dev', gulp.series('scripts:clean', lazyQuire(require, './gulp/core/recipes/scripts/dev')));
gulp.task('scripts:prod', gulp.series('scripts:clean', lazyQuire(require, './gulp/core/recipes/scripts/prod')));
gulp.task('scripts:watch', gulp.series('scripts:dev', lazyQuire(require, './gulp/core/recipes/scripts/watch')));
/**
* Styles
*/
gulp.task('styles:clean', lazyQuire(require, './gulp/core/recipes/styles/clean'));
gulp.task('styles:dev', gulp.series('styles:clean', lazyQuire(require, './gulp/core/recipes/styles/dev')));
gulp.task('styles:prod', gulp.series('styles:clean', lazyQuire(require, './gulp/core/recipes/styles/prod')));
gulp.task('styles:watch', gulp.series('styles:dev', lazyQuire(require, './gulp/core/recipes/styles/watch')));
/**
* Grouped
*/
gulp.task('default', gulp.parallel(
'fonts:watch',
'svg:watch',
'sprite:watch',
'images:watch',
'scripts:watch',
'styles:watch'
//'browser:sync',
)
);
gulp.task('build', gulp.parallel(
'fonts:prod',
'svg:prod',
'sprite:prod',
'images:prod',
'scripts:prod',
'styles:prod'
)
);