Answer the question
In order to leave comments, you need to log in
How to make automatic page reloading via gulp?
I have a local project running in vagrant. I write styles in less and compile through gulp. Everything cool. you just have to press f5 all the time in the next window after small edits. How can I make the pages automatically update after compiling less? When I just create a layout for a new project I use www.browsersync.io it is very good at reloading pages. But how to set it up on vagrant?
Answer the question
In order to leave comments, you need to log in
var browserSync = require('browser-sync');
var reload = browserSync.reload;
gulp.task('browser-sync', function() {
browserSync.init(null, {
proxy: 'vagrant',
port: 8080
});
});
gulp.task('default', ['browser-sync'], function () {
gulp.watch(['src/**/*.less'], reload);
});
https://www.google.com/search?q=vagrant&oq=vagrant...
well, or as an option chrome livereload extension
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question