Questions tagged [gulp-browser-sync]

148 questions
9
votes
3 answers

How to use browser sync with php

I would like to use Browsersync with PHP, but I can't seem to get it to work properly. Currently I am using Gulp. Is it possible to either use Browsersync with XAMPP/MAMP, or use a Gulp plugin to read .php files?
dr_fluff
  • 123
  • 1
  • 1
  • 7
8
votes
8 answers

gulp + browser-sync Cannot GET / error

I am learning the front-end build system currently gulp, i want to use brower-sync and the problem is it is not throwing an error in the commad line but instead when it brings up the browser it will not display my html file and it will say "Cannot…
Yasin
  • 81
  • 1
  • 1
  • 5
7
votes
2 answers

Gulp Browsersync causing multiple reloads with each filechange

I'm using browsersync with Gulp, running some tasks on particular filechanges. Whenever I save a file, I get 10+ [BS] Reloading Browsers... in my terminal and performance is understandably laggy. Here are my gulpfile: gulp.task('bowerJS', function()…
JVG
  • 20,198
  • 47
  • 132
  • 210
6
votes
2 answers

Enable Cors in Gulp/BrowserSync

I've created an Angular project with yeoman's boilerplate code (generator-gulp-angular) And now in my controller I'm trying to make a http request like this: $http.get('http://food2fork.com/api/search?key='+key+'&page=1').then(function(response) { …
Dwight Lisper
  • 435
  • 5
  • 9
5
votes
1 answer

How do you close old instances of BrowserSync when stopping Gulp in Terminal?

I'm new to Gulp and BrowserSync, so I've been running gulp and stopping (forced by ctrl + z in terminal) it many times. Every time I start gulp again in terminal, BrowserSync gives me a new PORT number. I need help removing the old instances of…
jussjosh
  • 103
  • 2
  • 9
5
votes
1 answer

Gulp browserSync keeps scrolling to top after reload

I have a problem with Gulp and BrowserSync, is really a small issue but is bugging me. Every time I change the scss file and I ran sass() to combile it the browser reloads and scrolls back to the top. Is there a way to prevent the browser to do that…
Christos312
  • 466
  • 6
  • 18
4
votes
5 answers

Using Browsersync via a Gulp Task with DDEV-local

I am using DDEV as my local hosting environment, and many of my projects implement front end automation via Gulp. Browsersync is a major component to our front end set-up, and requires ports to be exposed by the DDEV container to the host machine.…
TXChetG
  • 322
  • 2
  • 13
4
votes
1 answer

Browsersync not reloading

I used many variation of gulpfile.js and "browser-sync start --server --files "*.html" command of global browsersync, but autoreload not working. I received only [Browsersync] Access URLs: Local: http://localhost:3000 External:…
mndgreen
  • 43
  • 1
  • 3
4
votes
0 answers

Browsersync Https proxy will not inject css or reload browser

So I am proxying a MAMP SSL server with browser-sync, and I can not for the life of me figure out why it will not stream my css changes or reload for javascript. My current configuration works just fine if I do not use https via MAMP. Any help or…
Paul Kirby
  • 116
  • 8
4
votes
0 answers

gulp browsersync sass partials

I have the following problem and don't know whats going wrong with my gulpfile. Everything is working fine and my sass files are being compiled and the browser refreshed when changing something. But if I add a new partial file and import it into my…
3
votes
1 answer

How to call Browsersync init banner programmatically?

When Browsersync starts, it shows this banner to console: [BrowserSync] Proxying: http://localhost:10623 [BrowserSync] Access URLs: -------------------------------------- Local: http://localhost:30623 External: http://192.168.1.71:30623 …
3
votes
1 answer

Gulp 4 watch not working, only run one time

I changed from Gulp 3 to Gulp 4, but I can't get it to work. When I run gulp and save SCSS or HTML file it creates a new file successfully. If I save again nothing happens. It only runs ones. Below is my gulpfile.js 'use strict'; var gulp =…
user11002481
3
votes
1 answer

Gulp 4 php with browserSync

I am new to gulp-4. I try run gulp js with php, browserSync it doesn't work? All other task work but php and browserSync not work at all. it's not open with browser anything is here wrong? is it possible to use with php with browserSync or any…
3
votes
1 answer

How to use gulp browser-sync with 2 different docker containers?

I am trying to setup a local development environment with docker. Those things are already working with my setup below: container 1: node is running gulp, copy files if any file is changed on the host-system to the container 2 with volumes this…
Burg
  • 191
  • 3
  • 15
3
votes
0 answers

Gulp + Browsersync how to start Chrome with flags

I am looking to have gulp start browser sync in chrome with the flag --remote-debugging-port=9222 in order that I can connect via VS Code Chrome Devtools Extension. My gulp file (partial) looks like: gulp.task("browserSync", function () { …
cycle4passion
  • 3,081
  • 3
  • 14
  • 28
1
2 3
9 10