Last active
November 18, 2015 18:00
-
-
Save ben-w-smith/6ae43120dc1f2afbdeba to your computer and use it in GitHub Desktop.
Live Reload Gist
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 path = { | |
watch: [ | |
'file(s) you want to watch' | |
// example: '**/*.html' | |
] | |
}; | |
// Include gulp | |
var gulp = require('gulp'); | |
var plugins = require('gulp-load-plugins')(); | |
gulp.task('watch', function() { | |
plugins.livereload.listen(42857); | |
gulp.watch( path.watch ).on('change', function (event) { | |
plugins.livereload.changed(event.path); | |
}); | |
}); |
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
{ | |
"name": "LiveReload-Example", | |
"version": "1.0.0", | |
"authors": [ | |
"Ben <[email protected]>" | |
], | |
"description": "LiveReload Example", | |
"license": "MIT", | |
"private": true, | |
"devDependencies": { | |
"gulp": "^3.9.0", | |
"gulp-concat": "^2.6.0", | |
"gulp-livereload": "^3.8.0", | |
"gulp-load-plugins": "^1.0.0-rc.1", | |
"gulp-shell": "^0.4.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment