-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
40 lines (25 loc) · 1 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
const gulp = require('gulp');
const {browserSync} = require('./gulp-tasks/common');
const requireDir = require('require-dir');
requireDir('./gulp-tasks');
// Production build
// gulp.task('default', ['clean', 'apply-prod-environment', 'vendor', 'javascript', 'sass']);
// Production build
gulp.task('default', ['clean', 'apply-prod-environment', 'vendor', 'javascript', 'sass', 'images', 'fonts', 'icons']);
// Development build
gulp.task('dev', ['clean', 'vendor', 'javascript', 'sass', 'images', 'fonts', 'icons']);
// Development server
gulp.task('live', ['clean', 'vendor', 'javascript', 'sass'], () => {
gulp.start('watch');
});
// Server for templates
gulp.task('html', ['html-server']);
/*
** Auxiliary tasks
*/
gulp.task('watch', ['browser-sync'], () => {
gulp.watch('source/styles/**/*.scss', ['sass']);
gulp.watch('source/js/**/*.js', ['browser-reload']);
gulp.watch('source/local/static/*.html', browserSync.reload);
});
gulp.task('browser-reload', ['javascript'], browserSync.reload);