This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulp-config.js
111 lines (94 loc) · 1.61 KB
/
gulp-config.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
101
102
103
104
105
106
107
108
109
110
111
'use strict';
let config = {
dist_dir: './dist/',
settings: {
/*
There is a setting for every gulp module, which got called. The setting
itself is always a function, receiving the process.env und returning an
array. First array-item indicates, whether this task is enabled or not,
the second, the options.
cssnano: function(env) {
return [
!env.development,
{
...
}
];
},
*/
},
styles: {
dist_dir: 'css/modules',
src: [
'vendor/**/*.css',
'styles/modules/*.styl',
'styles/layouts/*.styl',
'styles/base/global.styl',
'styles/base/fonts.styl',
'node_modules/normalize.css/*.css',
],
settings: {},
},
scripts: {
dist_dir: 'js/modules',
src: [
'vendor/**/*.js',
'scripts/**/*.js',
],
settings: {},
},
images: {
dist_dir: '/images/',
src: [
'images/**/*',
],
},
fonts: {
dist_dir: '/fonts/',
src: [
'fonts/**/*',
],
},
'svg-sprite': {
dist_dir: '/images/',
src: [
'images/ui/**/*.svg',
],
},
watches: [
{
tasks: [
'styles',
],
paths: [
'./styles/**/*',
'./vendor/**/*.css',
]
},
{
tasks: [
'scripts',
],
paths: [
'./scripts/**/*',
]
},
{
tasks: [
'images',
],
paths: [
'./images/**/*',
]
},
{
tasks: [
'fonts',
],
paths: [
'./fonts/**/*',
]
},
],
};
module.exports = config;