-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
40 lines (38 loc) · 1.28 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
global.$ = {
gulp: require('gulp'),
gp: require('gulp-load-plugins')(),
bs: require('browser-sync').create(),
path: {
tasks: require('./gulp/config'),
serverDir: './app/build',
src: {
html: './app/src/*.{html,pug,jade}',
style: './app/src/styles/*.*',
js: './app/src/script/*.js',
img: './app/src/images/**/*.{png,jpg,gif}',
fonts: './app/src/fonts/**/**/*.*'
},
build: {
html: './app/build/',
style: './app/build/styles/',
js: './app/build/script/',
img: './app/build/images/',
fonts: './app/build/fonts/'
},
watch: {
html: ['./app/src/*.{html,pug,jade}', './app/src/view/**/*.{html,pug,jade}'],
style: './app/src/styles/**/*.*',
js: './app/src/script/**/*.*',
img: './app/src/images/**/*.{png,jpg,gif}',
fonts: './app/src/fonts/**/*.*'
}
},
tasks: {
default: ['html', 'style', 'js', 'img', 'fonts', 'watch', 'serve'],
build: ['html', 'style', 'js', 'img', 'fonts']
}
}
$.path.tasks.forEach(taskPath => require(taskPath)())
for(const val in $.tasks) {
$.gulp.task(val, $.gulp.series($.gulp.parallel(...$.tasks[val])))
}