-
Notifications
You must be signed in to change notification settings - Fork 72
/
gulpfile.js
37 lines (30 loc) · 1.65 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
const gulp = require( 'gulp' );
const requireDir = require('require-dir');
const tasks = requireDir('./tool/gulp/tasks/');
// command: gulp sass
tasks.sass.src = [ './development/**/*.scss', '!./development/**/_*.scss', '!node_modules/**' ];
exports.sass = tasks.sass.callback;
// command: gulp sass-use
tasks[ 'sass-use' ].src = [ './development/**/_*.scss', '!node_modules/**' ];
exports[ 'sass-use' ] = tasks[ 'sass-use' ].callback;
// command: gulp js-minify
tasks[ 'js-minify' ].src = [ './development/**/*.js', '!./development/**/*.min.js', '!node_modules/**' ];
exports[ 'js-minify' ] = tasks[ 'js-minify' ].callback;
// command: gulp js-concat
tasks[ 'js-concat' ].src = [ './development/**/{*,}.bundle/*.js', '!./development/**/*.min.js', '!./development/**/*.bundle.js' ];
exports[ 'js-concat' ] = tasks[ 'js-concat' ].callback;
// command: gulp js-concat-min
tasks[ 'js-concat-min' ].src = [ './development/**/{*,}.bundle/*.min.js', '!./development/**/*.bundle.js' ];
exports[ 'js-concat-min' ] = tasks[ 'js-concat-min' ].callback;
// command: gulp watch
exports.watch = gulp.series( function( cb ) {
gulp.watch( tasks.sass.src, tasks.sass.callback );
gulp.watch( tasks[ 'sass-use' ].src, tasks[ 'sass-use' ].callback );
gulp.watch( tasks[ 'js-minify' ].src, tasks[ 'js-minify' ].callback );
// watch([ '**/*.js', '!node_modules/**'], parallel(runLinter));
gulp.watch( tasks[ 'js-concat' ].src, tasks[ 'js-concat' ].callback );
gulp.watch( tasks[ 'js-concat-min' ].src, tasks[ 'js-concat-min' ].callback );
}
);
// gulp
exports.default = exports.watch;