2015-09-26 14:02:03 +02:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var browserSync = require('browser-sync').create();
|
|
|
|
|
|
|
|
// use default task to launch Browsersync and watch JS files
|
|
|
|
gulp.task('serve', function () {
|
|
|
|
|
|
|
|
// Serve files from the root of this project
|
|
|
|
browserSync.init({
|
|
|
|
server: {
|
|
|
|
baseDir: "./",
|
2015-09-27 17:04:35 +02:00
|
|
|
index: "example1.html"
|
2015-09-26 14:02:03 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// add browserSync.reload to the tasks array to make
|
|
|
|
// all browsers reload after tasks are complete.
|
|
|
|
gulp.watch("**/*").on('change', browserSync.reload);
|
|
|
|
});
|