// include gulp
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
// browser-sync task and settings
gulp.task('browserSync', function(){
browserSync.init({
open: 'external',
proxy: 'project.org'
});
});
// start watchers
gulp.task('watch', ['browserSync'], function(){
gulp.watch('**/*.*', browserSync.reload);
});
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var paths = {
php:['./**/*.php']
};
gulp.task('php', function(){
return gulp.src(paths.php)
.pipe(reload({stream:true}));
});
gulp.task('browserSync', function() {
browserSync({
proxy: 'project.org'
});
});
gulp.task('watch', function() {
gulp.watch(paths.php, ['php']);
});
gulp.task('default', ['watch', 'browserSync']);
Есть и альтернативные возможности:
https://browsersync.io/docs#requirements
https://browsersync.io/docs/options/#option-snippe...