-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
36 lines (29 loc) · 828 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
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
// Static server
gulp.task('browser-sync', function () {
browserSync({
server: {
baseDir: "./",
index: "index-vanila.html"
}
});
});
// process JS files and return the stream.
// gulp.task('js', function () {
// return gulp.src('js/*js')
// .pipe(browserify())
// .pipe(uglify())
// .pipe(gulp.dest('dist/js'));
// });
// Reload all Browsers
gulp.task('bs-reload', function () {
browserSync.reload();
});
// use default task to launch BrowserSync and watch JS files
gulp.task('default', ['browser-sync'], function () {
// add browserSync.reload to the tasks array to make
// all browsers reload after tasks are complete.
gulp.watch(["./*.html"], [browserSync.reload]);
});