forked from 10up/distributor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.babel.js
45 lines (40 loc) · 872 Bytes
/
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
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 sequenctial order.
*/
gulp.task( 'js', () => {
runSequence(
'webpack',
);
} );
/**
* Gulp task to run all Sass/CSS processes in a sequenctial order.
*/
gulp.task( 'css', () => {
runSequence(
'cssnext',
'cssnano',
'cssclean'
);
} );
/**
* 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 build processes in a sequenctial order.
*/
gulp.task( 'default', () => {
runSequence(
'css',
'webpack'
);
} );