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
-1
votes
2 answers

How to Solve Gulp 4.0 Errors?

I'm setting up gulp.js file for gulp 4.0 but I'm facing lots of errors. I'm new to gulp 4.0 and not familiar with new syntax. I tried many solution from different Sites But didn't worked for me. below is my gulp,js file code. Please Help me to find…
-1
votes
1 answer

GulpJS - how to save time by compiling only modified `js` files?

I have integrated the gulp build with my angular application development. Each time when a js,html,css changes I am compiling the files as single and running the app. in previous it was fine. when I add more js file I am getting delayed to reload…
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
-1
votes
1 answer

Gulp watch task was working fine, but is now generating an error when I try to start it

I'm working on a course project using gulp. Gulp has been working fine for weeks, but today I sat down at my computer to continue the course and am getting an error when I try and start my gulp watch task. Again, this has been working fine for…
-1
votes
2 answers

Invoke closure whenever js file is changed

I am using google-closure-compiler and gulp to minify my angularjs files. Here is my gulpfile code; var closureCompiler = require('google-closure-compiler').gulp(); var flatmap = require('gulp-flatmap'); var path =…
guagay_wk
  • 26,337
  • 54
  • 186
  • 295
-1
votes
1 answer

gulp running particularly slow

I met a very strange thing.My computer runs gulp really slowly. Each task takes about a minute,like this one enter image description here gulp watch is also same, My gulp/node/npm version,enter image description here My computer configuration, CPU :…
Twinna
  • 1
-1
votes
1 answer

Gulp - conditional task inside task

I'd like to set up my default task to run with watch task if environment is set production. I can't find solution to make my gulp-if conditional work in a tasks stack. Here's my code: gulp.task('default', ['styles', 'scripts', 'video' ], function()…
Malyo
  • 1,990
  • 7
  • 28
  • 51
-1
votes
1 answer

Gulp Not Watching

So consider the following gulp file: var gulp = require('gulp'); var source = require('vinyl-source-stream'); var browserify = require('browserify'); var babelify = require("babelify"); var watch =…
TheWebs
  • 12,470
  • 30
  • 107
  • 211
-1
votes
1 answer

File css with 0kb in gulp

My gulp save the css width 0kb. This is my code https://jsfiddle.net/v6y0qkux/ gulp.task('jpg', function () { gulp.src('./template/img/**/*.*') .pipe(changed('./dist/img/')) .pipe(imagemin({ …
concas
  • 99
  • 3
-1
votes
1 answer

Laravel Elixir: Gulp watch fires without any interaction

I have the following set up within the assets/sass folder: app.scss - partials _settings.scss _main.scss Now the issue is that when i run gulp watch, it runs all ok as a normal gulp, but then it just repeats the sass process,…
Simon Davies
  • 3,668
  • 9
  • 41
  • 69
-2
votes
1 answer

Why command "npm run watch" always rise an error?

I am trying to utilized node packages for the first time, the one I am trying to work with is from https://github.com/codingphasedotcom/Starter-Kit-2018 I have done everything in the readme.md file but I am getting an error every time I use the…
Jess_Archer
  • 11
  • 1
  • 3
-2
votes
1 answer

Browser refresh resets gulp watch scss compile

Basically, I run gulp watch, I change some scss code and hit save, then changes are applied to the site but when I refresh the page the changes are lost, So I have to hit save again in my code editor. Anyone recognize this? Thing is the 'refresh'…
MasterNone
  • 558
  • 1
  • 5
  • 20
1 2 3
55
56