Last active
August 29, 2015 14:08
-
-
Save cades/378465e7b4fc6c955506 to your computer and use it in GitHub Desktop.
static web development setup with livereload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
connect = require('gulp-connect'); | |
gulp.task('webserver', function(){ | |
connect.server({ | |
livereload: true | |
}); | |
}); | |
gulp.task('watch', function(){ | |
var files = [ | |
// your files | |
]; | |
gulp.watch(files, function(){ | |
gulp.src(files).pipe(connect.reload()); | |
}); | |
}); | |
gulp.task('default', ['webserver', 'watch']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"devDependencies": { | |
"gulp": "^3.8.10", | |
"gulp-connect": "^2.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment