forked from 10up/distributor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.babel.js
58 lines (52 loc) · 1.03 KB
/
gulpfile.babel.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
import gulp from 'gulp';
import requireDir from 'require-dir';
import runSequence from 'run-sequence';
import livereload from 'gulp-livereload';
requireDir( './gulp-tasks' );
/**
* Gulp task to run all JS processes in a sequential order.
*/
gulp.task( 'js', () => {
runSequence(
'jsclean',
'webpack'
);
} );
/**
* Gulp task to run all Sass/CSS processes in a sequential order.
*/
gulp.task( 'css', () => {
runSequence(
'cssclean',
'cssnext',
'cssnano',
'csscomplete'
);
} );
/**
* Gulp task to watch for file changes and run the associated processes.
*/
gulp.task( 'watch', () => {
livereload.listen( { basePath: 'dist' } );
gulp.watch( './assets/css/*.css', ['css'] );
gulp.watch( './assets/js/*.js', ['js'] );
} );
/**
* Gulp task to run the default release processes in a sequential order.
*/
gulp.task( 'release', () => {
runSequence(
'css',
'js',
'copy'
);
} );
/**
* Gulp task to run the default build processes in a sequential order.
*/
gulp.task( 'default', () => {
runSequence(
'css',
'js'
);
} );