Last active
August 29, 2015 14:17
-
-
Save nojaf/cd99ffd149df1fb3e77e to your computer and use it in GitHub Desktop.
Basic gulp watch file
This file contains 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
$ npm install -g gulp | |
$ npm install browser-sync gulp --save-dev |
This file contains 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"); | |
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