-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
60 lines (55 loc) · 1.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
require('dotenv').config();
// Include gulp
var requireDir = require('require-dir'),
gulp = require('gulp'),
// Include Our Plugins
notify = require('gulp-notify'),
livereload = require('gulp-livereload');
requireDir('./gulp', { recurse: true });
gulp.task('watch', function() {
'use strict';
livereload.listen();
gulp.watch(
process.env.DEV_FILES_DIR + '/' + process.env.JS_DIR + '/**/**/*.js',
gulp.parallel('lint', 'scripts')
);
gulp.watch(
process.env.DEV_FILES_DIR + '/' + process.env.SCSS_DIR + '/**/**/*.scss',
gulp.parallel('sass')
);
gulp.watch(
process.env.DEV_FILES_DIR + '/' + process.env.SVG_DIR + '/**/**/*.svg',
gulp.parallel('svgstore')
);
var liveReloadWatcher = gulp.watch(
'web/wp-content/**/**/**/*.twig',
function() {
return true;
}
);
liveReloadWatcher.on('change', function(file) {
livereload.reload(file);
notify('Templates Refreshed');
});
});
// Watch Files For Changes
gulp.task(
'startwatch',
gulp.series('lint', 'sass', 'scripts', 'svgstore', 'watch', function() {
done();
})
);
gulp.task(
'build',
gulp.series('lint', 'sass', 'scripts', 'svgstore'),
function() {
done();
}
);
gulp.task(
'default',
gulp.series('lint', 'sass', 'scripts', 'svgstore'),
function() {
done();
}
);