Skip to content

Instantly share code, notes, and snippets.

@johnsiwicki
Created March 7, 2017 15:39
Show Gist options
  • Select an option

  • Save johnsiwicki/a1019dadb2058051394868fe6f31c01d to your computer and use it in GitHub Desktop.

Select an option

Save johnsiwicki/a1019dadb2058051394868fe6f31c01d to your computer and use it in GitHub Desktop.
var gulp = require('gulp'),
connect = require('gulp-connect');
var fileTowatch = ["*.html","application/**"] ;
gulp.task('connect', function() {
connect.server({
livereload: true,
port : 8888
});
});
gulp.task('html', function () {
gulp.src(fileTowatch)
.pipe(connect.reload());
});
gulp.task('watch', function () {
gulp.watch(fileTowatch, ['html']);
});
gulp.task('default', ['connect', 'watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment