Skip to content

Instantly share code, notes, and snippets.

@nojaf
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nojaf/cd99ffd149df1fb3e77e to your computer and use it in GitHub Desktop.
Save nojaf/cd99ffd149df1fb3e77e to your computer and use it in GitHub Desktop.
Basic gulp watch file
$ npm install -g gulp
$ npm install browser-sync gulp --save-dev
var gulp = require("gulp");
var browserSync = require("browser-sync");
gulp.task("browser-sync", function() {
browserSync({
proxy: "http://localhost:8080"
});
});
gulp.task("watch", ["browser-sync"], function () {
gulp.watch(["*.html","*.css"]).on("change", browserSync.reload);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment