Skip to content

Instantly share code, notes, and snippets.

@daniellowtw
Created June 5, 2015 11:06
Show Gist options
  • Save daniellowtw/d5a0d79451832aef00af to your computer and use it in GitHub Desktop.
Save daniellowtw/d5a0d79451832aef00af to your computer and use it in GitHub Desktop.
gulp watch
var gulp = require('gulp'),
connect = require('gulp-connect');
watch = require('gulp-watch');
gulp.task('watch', function() {
watch(['*.html','js/*.js']).pipe(connect.reload());
});
gulp.task('server', function(done) {
connect.server({
root: '.',
port: 8080,
livereload: true
});
});
gulp.task('default', ['server', 'watch'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment