-
Notifications
You must be signed in to change notification settings - Fork 10
/
gulpfile.js
48 lines (41 loc) · 1.02 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
const gulp = require('gulp');
const clean = require('gulp-clean');
const requireDir = require('require-dir');
const run = require('gulp-run');
// Require all tasks.
requireDir('./gulp/tasks', {
recurse: true
});
gulp.task('clean', function () {
return gulp.src('./dist/', {allowEmpty: true})
.pipe(clean({force: true}));
});
gulp.task('build', gulp.series(
'clean',
'modernizr',
'build:resources',
'build:js'
));
gulp.task('run-npm-all-x21a', function() {
return run('npm run all:x21a').exec();
});
gulp.task('run-npm-build-fast', function() {
return run('npm run build:fast').exec();
});
// WATCHES
gulp.task('watch', function(){
return gulp.watch(
['./src/**/*.*',
'!./src/templates.js',
'./scss/**/*.*'],
gulp.series('run-npm-all-x21a')
);
});
gulp.task('watch:fast', function(){
return gulp.watch(
['./src/**/*.*',
'!./src/templates.js',
'./scss/**/*.*'],
gulp.series('run-npm-build-fast')
);
});