-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.babel.js
50 lines (45 loc) · 1.27 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
// Tasks
import gulp from 'gulp';
import html from './gulp/tasks/html';
import { libs as scssLibs, style as scssStyle } from './gulp/tasks/scss';
import webpack from './gulp/tasks/webpack';
import images from './gulp/tasks/images';
import clean from './gulp/tasks/clean';
import { lint, fix } from './gulp/tasks/eslint';
import PATH from './gulp/PATH';
import server from './gulp/tasks/server';
// html
gulp.task('html', html);
// scss
gulp.task('scss:libs', scssLibs);
gulp.task('scss:style', scssStyle);
// js
gulp.task('webpack', webpack);
// images
gulp.task('images', images);
// clean
gulp.task('clean', clean);
// eslint
gulp.task('eslint', lint);
gulp.task('eslint:fix', fix);
// build
// without js:libs'
gulp.task('build',
gulp.series(
'clean',
gulp.parallel('html', 'scss:style', 'scss:libs', 'webpack'),
'images'
));
// watch
gulp.task('watch', () => {
gulp.watch(PATH.html.watch, gulp.series('html'));
gulp.watch(PATH.scss.style.watch, gulp.series('scss:style'));
gulp.watch(PATH.scss.libs.watch, gulp.series('scss:libs'));
gulp.watch(PATH.js.watch, gulp.series('webpack'));
gulp.watch(PATH.img.watch, gulp.series('images'));
});
// server
gulp.task('serve', server);
// default
gulp.task('default',
gulp.series('build', gulp.parallel('watch', 'serve')));