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
1 answer

how to use gulp to move a directory with a depth of more than one

I am new to gulp. I have a directory in /src which I want to move to /dist. My directory looks like this with a depth of more than 1. folder1 - folder2 -folder4 -folder5 -folder6 -folder7 …
starkk92
  • 5,754
  • 9
  • 43
  • 59
0
votes
0 answers

Gulp-notify compile error

I am using gulpfile.js but it is throwing compile time error for gulp-notify Following is structure of package.json { "name": "flux-pricing", "version": "0.0.1", "description": "Pricing component with flux", "main": "gulpfile.js", …
Priya
  • 1,453
  • 4
  • 29
  • 55
0
votes
1 answer

Gulp Watch task

I have the following gulp tasks: gulp.task('less', function() { gulp.src('public/stylesheets/**/*.less') .pipe(less()) .pipe(minifycss()) .pipe(concat('styles.min.css')) …
Markus
  • 1,565
  • 6
  • 26
  • 57
0
votes
1 answer

How to add a watch to a folder in gulp

I have the following glupfile.js, it works fine but I need to run the default gulp task when a files in folder. How to change my script in order to support gulp watch? var gulp = require('gulp'); var jscs = require('gulp-jscs'); var jshint =…
GibboK
  • 71,848
  • 143
  • 435
  • 658
0
votes
1 answer

laravel gulp watch not updating sass css files

In our Laravel 5.1 app, we are using elixir and gulp to compile css from sass. When we run just gulp, everything compiles correctly and the css files are up to date. Yet, when we run gulp watch, and we update a .scss file, Gulp says Sass Compiled…
user1013129
  • 123
  • 1
  • 4
  • 11
0
votes
1 answer

Webpack dev server run on different port

So I have IIS serving up my WebApi and AngularJS project on port 80, using a the alias mywebsite.local-dev.com in the hosts file. I have webpack config setup for bundling, all I want to do now is stick webpack dev server over the top so that when I…
Callum Linington
  • 14,213
  • 12
  • 75
  • 154
0
votes
3 answers

With gulp, are watch tasks guaranteed to run before other tasks?

I have a gulp watch task that uses gulp-sass to convert SASS to CSS. For development, separated CSS files are all I want. For release, I have a min tasks that uses gulp-cssmin and concat to bundle and minify the CSS. However, the min task doesn't…
Edward Brey
  • 40,302
  • 20
  • 199
  • 253
0
votes
0 answers

Occassional Gulpfile freakout using gulp-changed and/or gulp-newer and and upload task

I've written a nice little build script that runs some pretty standard tasks like... Cleaning out my deploy/ directory before initially Building, concatenation, uglifying, and copying files from their dev/ directories to associated deploy/…
0
votes
1 answer

browsersync gulp proxing doesnt work well with wordpress get_template_path

I have a strange problem. I use browser sync and gulp for my wp-project and strange thing appears. I use gulp serve task: gulp.task('serve', ['styles'], function() { browserSync.init(null, { proxy : localhost:8888/mywpsite, …
bigcat
  • 152
  • 2
  • 11
0
votes
1 answer

Gulp unhandled error

I have a pretty simple gulp file with a couple tasks: - Clean a folder - Copy files I have a watch setup. I keep getting an error: events.js:85 throw er; // Unhandled 'error' event ^ Error: ENOENT, open…
TheWebGuy
  • 11,429
  • 16
  • 52
  • 72
0
votes
0 answers

Implementing 'gulp-file-include' in 'yeoman/generator-gulp-webapp'

I'm using yeoman/generator-gulp-webapp and I've added gulp-file-include plugin. I've generated vanilla gulpfile.babel.js by using yeoman, but I'm not sure how to implement this plugin (file-include) in this file (gulpfile.babel.js) in such a way…
Faisal Khurshid
  • 1,869
  • 3
  • 21
  • 27
0
votes
2 answers

Gulp task outputs fine when run manually, fails to output when used in gulp.watch

I have a gulp task that performs some pretty common tasks - it runs jshint to validate my code, then concats and minimizes the files and outputs them into single .min.js files. The task (appears) to execute flawlessly when I run it manually. But…
Cliff
  • 162
  • 7
0
votes
1 answer

gulp watch not watching imported less files

i'm using Laravel 5.1, which ships with laravel elixir - a wrapper for gulp. My gulpfile.js looks like this: var elixir = require('laravel-elixir'); elixir(function(mix) { mix.less('app.less'); }); And app.less looks like this: @import…
spooky
  • 421
  • 5
  • 20
0
votes
1 answer

gulp concatenation with root and subfolders

I've the following gulp build process in place. gulp.task("watch", function(){ gulp.watch("public/admin/js/**/*.js", ["login"]); } gulp.task("login", function() { var js = [ "!public/admin/js/api", "public/admin/js/*.js", …
user2727195
  • 7,122
  • 17
  • 70
  • 118
0
votes
1 answer

Issue with task not executing when using gulp with run-sequence

I am new to gulp and so I put a simple script together to 1) learn how gulp works and 2) improve my development workflow. The issue I am having is that if I set the runSequence task list to be in the order of jscs and then lint, the lint task does…
Anil
  • 2,539
  • 6
  • 33
  • 42