Questions tagged [gulp-browser-sync]
148 questions
1
vote
0 answers
How to add a gulp task to an existing watch task?
I want to add Browser Sync to the gulpfile.js, and got so far as below.
It is a Drupal 8 site on MAMP / apache 80.
I have this working script when I run gulp runbsync. I would like to add it to gulp watch.
I have tried various methods to include…

petergus
- 1,192
- 1
- 12
- 18
1
vote
0 answers
browserSync.reload() stopped working after node 8.9.4 upgrade
The following setup works like this:
I change a file
gulp tasks kick off that end up changing /file/to/watch.js
nodemon restarts my express server
browserSync.reload() is called
the browsers reload
Ever since updating to node 8.9.4 (I think that's…

nbrustein
- 727
- 5
- 16
1
vote
0 answers
Gulp / Browsersync doesn't show Images
Browser doesn't show images.
If i look into the code and open the image in a new tab the following message appears: Cannot GET /app/img/b1.jpg
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var…

simon
- 33
- 4
1
vote
0 answers
Browser-Sync - All events Hook - Gulp
Recently I discovered browser-sync. Now the application I want to write requires a kind of google map functionality. I noticed that natively browser-sync only supports "scroll,click and forms". I need to hook into all events or at least when…

James Thor
- 13
- 3
1
vote
0 answers
Browser-sync gulp won't load files with query string
I am facing a weird problem right now. So, I am trying to test production build, and the build files generated contain a ?v=${some random number here} to prevent caching.
However, the browser-sync doesn't load these files.
The way I figured that out…

relentless-coder
- 1,478
- 3
- 20
- 39
1
vote
0 answers
gulp Live reload for server side
I have a developed gulp file with both browser-sync and live reload. this gulp file works perfectly for my requirements. for the base idea, I have a root folder in my Apache server and inside it I have my project folders.
--public
---proj1
…

Dilakshan Sooriyanathan
- 145
- 3
- 16
1
vote
0 answers
Browser-sync doesn't save scroll position when refresh browser page
Page scrolls up after changes (include changes in css).
After css changes I see notification "Injected: style.css".
Used Firefox, Gulp 3.9.1, and Browser-sync 2.18.13.
const gulp = require('gulp');
const browserSync =…

Skif
- 1,178
- 4
- 14
- 26
1
vote
1 answer
Adding BrowserSync to gulpfile.js
I have the following code in gulpfile.js file
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
concat = require('gulp-concat');
gulp.task('sass', function(){
…

ronjacob
- 169
- 1
- 7
1
vote
0 answers
Integrating Gulp and bower into Zend Project
The issue is, I would like to use all benefits of tasks runner and bower into my existing Zend-Project. I'm not sure, how should I restructure my whole project folder.
My current structure looks like follows:
config
module
vendor
…

tookie009
- 186
- 1
- 14
1
vote
1 answer
Gulp + Browsersync: Only want to inject CSS
I have been attempting to get live injecting working for two days now... Getting ready to give up as I've read the docks and more git is:issues than I want to repeat.
I don't use preprcessors like less or sass. I just want to have the changed CSS…

ecotechie
- 71
- 6
1
vote
1 answer
Gulp + Browser Sync failing
I'm running Gulp with Browser Sync and getting the following errors in Chrome:
NonESPMessageInterface --- nonEspMessageInterface.js:8
TypeError: Cannot read property 'insertBefore' of null --- angular.js:13708
Checklist message was invalid, from…

Jon C. Young
- 43
- 1
- 6
1
vote
3 answers
What does () => {} mean in gulpfile.js
I'm in the learning path of js, and just started using the yeoman generators. And I use gulp for the pre-processing and other stuffs. When I was going through the gulpfile.js, I found this block of code.
gulp.task('serve', ['styles', 'html',…

Unknown User
- 3,598
- 9
- 43
- 81
1
vote
1 answer
Browsersync reloads the page before CSS injection
I'm implementing a build using Gulp, Browsersync, Sass for CSS and Pug for HTML. I'm also injecting stylesheets s into HTML after the styles and markup are compiled.
Initial build works fine, but I'm having a problem to implement watching for…

Robert Kusznier
- 6,471
- 9
- 50
- 71
1
vote
1 answer
Browsersync Middleware to Replace String
I am trying to create a Browsersync middleware to replace a string in HTML files before they are served to the browser.
I'm not entirely sure this is even possible.
So far I am able to identify when a HTML file is being requested by:
function…

Jonathon Oates
- 2,912
- 3
- 37
- 60
1
vote
1 answer
No console output in a TypeScript project using BrowserSync and Gulp
For my TypeScript project I'm using BrowserSync to check results of my work. I'm trying to log some of my application states via console.log in a TypeScript code.
My Gulp tasks:
gulp.task('watch', ['browserSync'], function (){
…

Chris Jaga
- 389
- 4
- 17