Questions tagged [gulp-livereload]

Lightweight gulp plugin for LiveReload that is primarily used with LiveReload Chrome extension.

gulp-livereload makes it possible to integrate LiveReload into the gulp workflow. It is currently best used with LiveReload Chrome extension.

Simple example:

var gulp = require('gulp'),
less = require('gulp-less'),
livereload = require('gulp-livereload');

gulp.task('less', function() {
  gulp.src('less/*.less')
    .pipe(less())
    .pipe(gulp.dest('css'))
    .pipe(livereload());
});

gulp.task('watch', function() {
  livereload.listen();
  gulp.watch('less/*.less', ['less']);
});

gulp-livereload npm package: https://www.npmjs.com/package/gulp-livereload.

56 questions
1
vote
0 answers

Gulp task without a return

Is it possible to have a Gulp task which doesn't have a return? I'm trying to create a simple build tasks which notifies the user on success, but all the other tasks I've written previously return something and use pipes to handle associated…
Alex Ryans
  • 1,865
  • 5
  • 23
  • 31
1
vote
4 answers

Gulp tasks chaining

I'm using gulp to compile some .less files and inject the changes in the browser with live-reload. This is the task I originally created: var gulp = require('gulp'); var less = require('gulp-less'); var watch = require('gulp-watch'); var plumber =…
Yannick Schall
  • 32,601
  • 6
  • 29
  • 42
1
vote
1 answer

possible to use gulp-livereload to refresh the page on just a change, no save?

Is it possible to use the node package gulp-livereload to refresh the page on just a change, without pressing command+s to save the file you are editing?
Micah Stubbs
  • 1,827
  • 21
  • 34
1
vote
1 answer

Gulp-livereload, -webserver and -embedlr. How to use them together?

I try to understand how to use gulp with these useful and popular plugins. There are what I have: runned go(lang) server on localhost:8000 static/local html files under app folder which are used by server to form pages scss files under the same…
Timur Fayzrakhmanov
  • 17,967
  • 20
  • 64
  • 95
1
vote
0 answers

Gulp - Livereload fails for svg inside object tag

My gulp watch task is configured as follows: gulp.task('watch', function() { gulp.watch('js/*.js', ['scripts']); gulp.watch('jade/*.jade', ['jade']); gulp.watch('stylus/*.styl', ['stylus']) …
doei
  • 77
  • 1
  • 7
0
votes
1 answer

I'm getting error in node using gulp and gulp-livereload

i downloaded livereload extension but it's not working, here's the error. Error: watching ./src/*.css: watch task has to be a function (optionally generated by using gulp.parallel or gulp.series) var gulp = require("gulp"), livereload =…
Tiko
  • 1,241
  • 11
  • 19
0
votes
1 answer

Gulp css styles are not updated

I have problem. Yestrday I had to update the Node.js kernel and now that I change something in the LESS file, there will be no css update. Gulpfile is the same as before the update. Could someone advise me what's wrong with my gulpfile script? The…
ondra15
  • 143
  • 4
  • 16
0
votes
1 answer

Integrating tiny-lr in gulp-live-server

I'm using the node module gulp-live-server to run an express app at app.js. It works, but the browser doesn't live reload. Near the bottom of the page in the link above the docs say that one must use the tiny-lr mod to integrate live reload. I…
Caleb Bertrand
  • 410
  • 5
  • 15
0
votes
1 answer

Gulp livereload SyntaxError: Unexpected token . how to fix?

when i run gulp command this error is blow up if you have some ideas how to fix this, i'm ready to listen)) ! if you have some ideas how to fix this, i'm ready to listen)) > C:\Users\P.A.N.D.E.M.I.C\Desktop\try\gulpfile.js:19 > …
InvictusManeoBart
  • 373
  • 3
  • 8
  • 25
0
votes
1 answer

gulp livereload uses outdated css file

I'm using the following gulp setup to compile my sass documents to one minified css document, to minify my js and to livereload the browser when I save any document in my IDE (Atom). var gulp = require('gulp'); var uglify =…
iamrobin.
  • 1,554
  • 3
  • 19
  • 31
0
votes
0 answers

Yeoman, Gulp livereload fails on html5Mode

Im using yeoman with gulp, after i enable html5Mode on angular, livereload stop working, this is my current gulp connect code: gulp.task('start:server', ['environment'], function() { $.connect.server({ root: [yeoman.app, yeoman.temp], host:…
0
votes
3 answers

Gulp lint takes too much time

I have a problem with the linting and live reloading in my gulp file. They take to much time to finish. Here is my gulp file, what do I do wrong : 'use strict'; console.time("Loading plugins"); //start measuring var gulp = require('gulp'); var…
Boky
  • 11,554
  • 28
  • 93
  • 163
0
votes
1 answer

livereload - Image is not resize immediately after uploading

I have created gulp tasks scheduler for JavaScript minification and image resizing. All things work nicely when I executes command manually. Command: gulp But when I include gulp-livereload module to perform operation automatically, Command line…
Dipak
  • 2,248
  • 4
  • 22
  • 55
0
votes
1 answer

gulpfile.js help to add live reload

wonder if someone can help me solve my problem. I am new to gulp and have successfully created a gulp file that works how I want it to by following different guides online. I am trying to add CSS minify and live reload. Wonder if someone can help me…
user5891672
0
votes
1 answer

gulp-livereload reload CSS without refresh entire page

I'm working with remote server, and after any file changes it deployed to server via gulp-sftp. Also im working with SASS, and have task to compile it. Compile task gulp.task('compile_css',function(){ gulp.src('css/**/*.scss') .pipe(compass({ …
Alexey Svidentsov
  • 497
  • 1
  • 4
  • 12