-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (31 loc) · 863 Bytes
/
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
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
browserSync.init({
server: "./"
});
browserSync.stream();
gulp.task('default', (done)=>{
//gulp.watch('*.*', gulp.series('watcher'));
//gulp.watch('./js/*.*', gulp.series('watcher'));
//gulp.watch('./css/*.*', gulp.series('browser-sync'));
gulp.watch('*.*').on('change', browserSync.reload);
gulp.watch('./js/*.*').on('change', browserSync.reload);
gulp.watch('./css/*.*').on('change', browserSync.reload);
console.log('gulp worked');
done();
});
gulp.task('browser-sync', (done)=>{
console.log('file has changed');
done();
});
gulp.task('another_task', (done)=>{
const a = 23;
const b = 54;
const c = a + b;
console.log(`the sum result of ${a} and ${b} is ${c}`);
done();
});
gulp.task('watcher', (done)=>{
console.log('file has changed');
done();
});