Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. var gulp = require('gulp'),
  2. browserSync = require('browser-sync').create(),
  3. watch = require('gulp-watch');
  4.  
  5. gulp.task('default', ['webserver', 'watch']);
  6.  
  7. var path = {
  8. watch: {
  9. js: '../js/**/*.js',
  10. },
  11. };
  12.  
  13. gulp.task('webserver', function() {
  14. browserSync.init({
  15. proxy: 'localhost'
  16. });
  17. });
  18.  
  19. gulp.task('watch', function() {
  20. gulp.watch(path.watch.js).on('change', browserSync.reload);
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement