browser-sync

CSS inject not working with Gulp + Browsersync

别来无恙 提交于 2019-12-11 14:40:59
问题 I'm new in gulp, I used to work with grunt, and I'm having some troubles with gulp now. The most important of them is the auto CSS inject, that isn't woking and after a lot of time I don't know why. Can anyone help me? And also give me some suggestions about my config? Thanks in advance! 'use strict'; var gulp = require('gulp'), sass = require('gulp-sass'), autoprefixer = require('gulp-autoprefixer'), csso = require('gulp-csso'), jshint = require('gulp-jshint'), uglify = require('gulp-uglify'

Using browsersync with gulp/nodemon

痴心易碎 提交于 2019-12-11 08:02:01
问题 I'm trying to get Browsersync (version 2.12.5) to work with gulp-nodemon/watching files. These are my gulp tasks. I can't seem to get any of my files to update/reload the browser. var $ = require('gulp-load-plugins')(); var browserSync = require('browser-sync'); var gulp = require('gulp'); // load in gulp tasks etc...... gulp.task('server', function() { return $.nodemon({ script: 'server.js' }); }); gulp.task('browser-sync', ['server'], function() { browserSync.init({ proxy: 'http://localhost

Can't use gulp (with gulp-connect-php and gulp-browser-sync) with multiple projects

只愿长相守 提交于 2019-12-10 22:08:44
问题 I've recently started using gulp and have a nice workflow but when I added the gulpfile to a new project, every time I run gulp from the original project directory, it serves the newest project and I have no idea what I've done. This should be the relevant contents of my gulpfile: var gulp = require('gulp'); /* etc. */ gulp.task('default', function(callback) { runSequence(['connect-sync'], callback ) }); gulp.task('connect-sync', function() { connect.server({ base: 'app' /* tried ./app */ },

Gulp 4 & BrowserSync: Style Injection?

▼魔方 西西 提交于 2019-12-10 18:48:06
问题 I'm attempting to use browser-sync with Gulp 4, but bs is not preserving state, and instead does a full refresh. This is not very useful. It seems bs no longer supports true injection. I filed an issue on GH if you want to contribute. Here is the pertinent code: // styles:dev task gulp.task('styles:dev', function() { return gulp.src(config.src) .pipe(sourcemaps.init()) .pipe(postcss(config.postcss.dev)) .pipe(sourcemaps.write('.')) .pipe(gulp.dest(config.dest.dev)) .pipe(browserSync.stream())

How to use Gulp Browsersync with Django?

北慕城南 提交于 2019-12-10 06:18:17
问题 First time using Gulp and I'm following a couple of tutorials that don't seem to be working quite right for me. I have a real basic project and I just want to learn how to use Gulp for standard things like JavaScript/CSS minification, image reduction, and browser sync. When I run my watch task with Browsersync, it goes to the right URL of localhost:8000 , but it shows Cannot GET / instead of rendering my page. How do I fix this so I can use Browsersync with Django? File directory: gulpfile.js

Browser-sync TypeError args.cb is not a function

て烟熏妆下的殇ゞ 提交于 2019-12-09 09:18:45
问题 I'm using browser-sync in gulp task for example : gulp.task('gulp-task',function(){ browserSync.init({ server:{ baseDir: 'app' } }) //rest of task }); I use this gulp task in gulp watch for( for example ) app/**/*.html like : gulp.task('watch',function(){ gulp.watch('app/**/*.html', ['gulp-task']); }); for first time change in html files everything is ok but for next changes i get error: TypeError: args.cbn is not a function ... guys said to install latest version for browser-sync with

Browsersync not reloading all pages

醉酒当歌 提交于 2019-12-08 11:46:18
问题 Browsersync is just reloading index.html, even though I have my basedir set, and even the specific files listed on the files option. I have looked on their docu but I have everything as they say, still it only refreshed or syncs index.hrml but about.html for example not. My structure is this: -booming-gaes-web -dist -node_modules -src -index.html -about.html -gulpfile.js So my html files are direclty on my src folder, and the gulp file is in the same folder as the src folder. My gulp file: //

gulp Segmentation fault: 11 and Abort trap: 6 OSX Yosemite

人盡茶涼 提交于 2019-12-06 12:02:48
问题 We've been running on gulp with a set of tasks, with browser-sync and gulp.watch to reload the browser when files are changed. Increasingly I've been seeing more and more Segmentation fault: 11 and Abort trap: 6 intermittently on 2 different projects. The gulp task layout is a derivative of this: https://github.com/notbrain/viceroy I really have no idea where to start pinpointing the culprit besides whittling down the set of tasks to run until I run into the issue when only running a single

How to do remote debugging with Browser-sync?

不羁岁月 提交于 2019-12-05 20:54:21
问题 I have installed browser sync with npm. On their website, they have mentioned that it also allows remote debugging. But they have not mentioned that how to do remote debugging. I have used below command to run mysite on browser-sync. browser-sync start --proxy localhost:8080/mysite how can I remote debug that? 回答1: Though this was quite a tricky process in versions before Browser-sync 2.0, but with Browser-sync 2.0 you now have a brand new Web UI, which makes this process a whole lot easier.

How to use Gulp Browsersync with Django?

爷,独闯天下 提交于 2019-12-05 13:19:23
First time using Gulp and I'm following a couple of tutorials that don't seem to be working quite right for me. I have a real basic project and I just want to learn how to use Gulp for standard things like JavaScript/CSS minification, image reduction, and browser sync. When I run my watch task with Browsersync, it goes to the right URL of localhost:8000 , but it shows Cannot GET / instead of rendering my page. How do I fix this so I can use Browsersync with Django? File directory: gulpfile.js : var gulp = require('gulp'); var sass = require('gulp-sass'); var browserSync = require('browser-sync