Last active
January 11, 2017 12:07
-
-
Save inanutshell86/864d8710657809b9183046d4df95d4e7 to your computer and use it in GitHub Desktop.
gulp-browser-sync
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"), | |
| browserSync = require('browser-sync'); | |
| gulp.task('server', function () { | |
| browserSync({ | |
| port: 9000, | |
| server: { | |
| baseDir: 'app' | |
| } | |
| }); | |
| }); | |
| gulp.task('watch', function () { | |
| gulp.watch([ | |
| 'app/*.html', | |
| 'app/js/**/*.js', | |
| 'app/css/**/*.css' | |
| ]).on('change', browserSync.reload); | |
| }); | |
| gulp.task('default', ['server', 'watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment