-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
54 lines (46 loc) · 1.13 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
49
50
51
52
53
54
'use strict';
var gulp = require('gulp');
var HubRegistry = require('gulp-hub');
var browserSync = require('browser-sync');
// load some files into the registry
var hub = new HubRegistry(['./gulp/tasks/*.js']);
// tell gulp to use the tasks just loaded
gulp.registry(hub);
// define composite tasks
gulp.task('watch', () => {
gulp.watch('./app/*.html', { ignoreInitial: false }, done => {
browserSync.reload();
done();
});
gulp.watch(
'./app/assets/styles/**/*.css',
{ ignoreInitial: false },
gulp.series('styles', 'cssInject')
);
gulp.watch(
'./app/assets/scripts/**/*.js',
{ ignoreInitial: false },
gulp.series('modernizrTask', 'scripts', done => {
browserSync.reload();
done();
})
);
});
exports.watch = gulp.parallel('server', 'watch');
exports.icons = gulp.series(
'beginClean',
'createSprite',
'createPngCopy',
gulp.parallel('copySpriteGraphic', 'copySpriteCSS'),
'endClean'
);
exports.build = gulp.series(
'icons',
'deleteDistFolder',
gulp.parallel(
'copyGeneralFiles',
'optmizeImages',
gulp.series('styles', 'scripts', 'usemin')
),
'previewDist'
);