Skip to content

Instantly share code, notes, and snippets.

@holykol
Last active March 21, 2018 10:27
Show Gist options
  • Save holykol/4a05641566efdf4c7653a5e640b49e5d to your computer and use it in GitHub Desktop.
Save holykol/4a05641566efdf4c7653a5e640b49e5d to your computer and use it in GitHub Desktop.
Simple HTML livereload
// yarn init -y && yarn add gulp gulp-connect gulp-watch
var gulp = require('gulp'),
connect = require('gulp-connect'),
watch = require('gulp-watch');
gulp.task('serve', function(event) {
connect.server({
root: "./",
port: 3000,
livereload: true
});
// sets up a livereload that watches for any changes in the root
watch("./*")
.pipe(connect.reload());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment