Questions tagged [gulp-watch]

A gulp plugin that listens for file changes and emits changed files into the stream. Not to be confused with the built-in gulp.watch().

Installation

npm install --save-dev gulp-watch

Usage

gulp.task('watch-css', function () {
  return gulp.src('css/**/*.css')
    .pipe(watch('css/**/*.css'))
    .pipe(gulp.dest('build'));
});

Recipes

Links

836 questions
0
votes
0 answers

Gulp watch not working on imported less file

I'm trying to compile all the .less files to css, and leave .import.less files unprocessed (similar to Meteor less package). My file structure is as…
movila
  • 927
  • 1
  • 8
  • 12
0
votes
1 answer

Gulp 'watch' not saving files rendered with gulp-swig

I've used Gulp a number of times but this problem has me totally stumped. I have a render task to save an HTML template piped through gulp-swig. It works perfectly fine when invoked manually via gulp render but will not save when the task is…
pete
  • 2,739
  • 4
  • 32
  • 46
0
votes
1 answer

Why does gulp-watch ignore glob-parameter?

Given the following gulpfile.js (simplified), why does gulp-watch not exclude the mongoData-folder? 'use strict'; var gulp = require('gulp'), paths = { js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**',…
Tobias Mühl
  • 1,788
  • 1
  • 18
  • 30
0
votes
1 answer

How to detect css theme and work only with this theme?

I have a project in which there are about 30 css themes. It means I have the next css files structure: src/ themes/ default/ a.scss b.scss rockStar/ a.scss b.scss …
pavel06081991
  • 629
  • 1
  • 8
  • 14
0
votes
1 answer

Gulp tasks working alone but not in watch mode

I am developing a CLI tool running on node.js. I am trying to setup my environment for tdd but I have difficulties to do it with gulp. All my 'standalone' tasks from gulp work. Here they are: Build task: var tsProject = ts.createProject({ …
0
votes
2 answers

gulp live reload config

Hello I try to create my own config. and its much working well but some times i when i change html code live reload is not working dont know why. Any one can help with that? var livereload =…
user2217288
  • 529
  • 2
  • 14
  • 26
0
votes
1 answer

how does gulp reload work?

I have defined a gulpfile.js that looks like this: var gulp = require('gulp'), connect = require('gulp-connect'); gulp.task('connect', function() { console.log('connecting'); connect.server({ livereload: true, …
Pindakaas
  • 4,389
  • 16
  • 48
  • 83
0
votes
1 answer

Duplicate Tasks on self reloading gulp

I have set up gulp so that it will reload when the gulpfile is modified. That basic process is working, but for some reason it seems the old tasks are not being terminated properly. var gulp = require('gulp'); var less = require('gulp-less'); var…
Matt
  • 2,795
  • 2
  • 29
  • 47
0
votes
1 answer

gulp-watch-less not triggering on Windows

I have been trying to solve this problem for a couple of days now. I am trying to get gulp to compile my less files when I save them but gulp-watch-less is not being triggered by changes in files I am watching. My gulpfile.js is: var gulp =…
Ben
  • 897
  • 2
  • 16
  • 34
0
votes
1 answer

drupal 7 theming + gulp + sass + browserSync no css injection

I'm able to get browserSync.reload({stream:true}) to css inject into a wordpress theme. When I try the same gulpfile.js in a Drupal 7 theme a hard reset works, browserSync.reload(), but css injection does nothing,…
Bradley
  • 306
  • 3
  • 12
0
votes
1 answer

My web page dosn't updated when i made changes in index.html file

I'm beginner in useing gulp.js , My web page Not affected by changes that I made in my index.html file and i see this error server.changed(e.path); ^ TypeError: undefined is not a function i try to make a changes in gulp-livereload but…
Ali Allam
  • 45
  • 10
0
votes
0 answers

the task can't be called by watch module.

It's very weird. The 'htmltemplates' task is working, but the 'html-templates' task is not working. I tried many things. When I executed the gulp command, it worked. but the task wan't called by watch module. Why? Help me... var gulp =…
verystrongjoe
  • 3,831
  • 9
  • 35
  • 66
0
votes
1 answer

gulp watch ends too soon

I'm getting the same problem as this guy. My terminal looks like: $ gulp watch [23:59:03] Using gulpfile gulpfile.js [23:59:03] Starting 'watch'... [23:59:03] Finished 'watch' after 8.68 ms http://jsbin.com/poxoke/1/edit?js Why can't I get it to…
heyjohnmurray
  • 205
  • 3
  • 14
0
votes
1 answer

Live reloading not working after Ctrl + S in GULP

I do not know why those tasks for live reloading just disappear after the last Ionic Update I did. Now I am trying to fix this issue but still wondering why is not working. I am following this guide here and still can not see what is the error I…
Non
  • 8,409
  • 20
  • 71
  • 123
0
votes
1 answer

Gulp "watch" is not running the sub task "sass" on file change

I am using Gulp for watch and sass complier. When I start "watch" first time then "sass" complier runs and its create the css files as per given path. However when I change the .scss files then it doesn't call "sass" complier again. Following is is…
joy
  • 3,669
  • 7
  • 38
  • 73