D
D
DmitryKorol2015-11-12 12:03:49
open server
DmitryKorol, 2015-11-12 12:03:49

How to configure browser-sync for OpenServer?

Good afternoon. Recently, I finally set up browser sync for gulp and felt how good it is =)
But there is a problem, I don’t understand how to make it reload the site on another local server, in my case I work with open-server. Maybe someone has already solved this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gleb, 2016-01-21
@TheKittyKing

configured as follows:

var gulp        = require('gulp');
var browserSync = require('browser-sync').create();

gulp.task('browser-sync', function() {
    browserSync.init({
        proxy: "apple"
    });
});

gulp.task('bs-reload', function () {
    browserSync.reload();
});

gulp.task('watch-css', function () {
    gulp.watch("../assets/static_file/**/*.tpl", ['bs-reload'])
});

//default
gulp.task('default', ['browser-sync','watch-css']);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question