Questions tagged [gulp-changed]

gulp-changed is a gulp plugin allowing to process only changed file.

gulp-changed is a gulp plugin allowing to process only changed files.

https://www.npmjs.org/package/gulp-changed

16 questions
6
votes
1 answer

Gulpfile that efficiently compiles only changed TypeScript files

I'm trying to make gulp compile and watch TypeScript files. This is what I have got so far var tsProject = plugins.typescript.createProject( { removeComments: false, target: 'ES5', module: 'amd', noExternalResolve: false, …
Klas Mellbourn
  • 42,571
  • 24
  • 140
  • 158
4
votes
1 answer

javascript, gulp, watch, changed

I cannot get my head around this. This is supposed to be a gulp task that is executed every time a watched file is modified. Can anyone explain why it is required to pipe the watched files through the changed plugin? gulp.task('build-css', function…
mishoo78
  • 85
  • 2
  • 7
4
votes
1 answer

How to use gulp-changed with gulp-typescript

I'm integrating gulp-changed to prevent all files being logged to the console on change. This works for my HTML files, but I'm also using gulp-typescript to transpile my TypeScript files into JavaScript. I use the TypeScript workflow as suggested by…
Nicky
  • 3,607
  • 6
  • 33
  • 64
4
votes
2 answers

How to make gulp-newer work with gulp-rev?

The setup is as simple as this: gulp.task('rev-js', function() { return gulp.src('/js/main.js, {base: '.'}) .pipe(newer('_build')) .pipe(rev()) .pipe(gulp.dest('_build')) .pipe(rev.manifest()) …
Tigran Petrossian
  • 1,158
  • 1
  • 7
  • 16
3
votes
1 answer

Gulp Changed doesn't work

I have previously used gulp changed with my JS without a problem. However now I am trying to use gulp-changed and gulp-newer on my scss files without it detecting which file has changed. var changed = require('gulp-changed'); var newer =…
Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291
2
votes
2 answers

gulp-changed / gulp-newer + gulp-rename don't work

I try to bypass minifying, resizing and renaming already processed images, and adding 'gulp-changed' changed nothing for me; all the files are processed, еvery time. I tried 'gulp-newer' instead, but still with no luck. Later, I've figured out - if…
Mikhail Vasin
  • 2,421
  • 1
  • 24
  • 31
1
vote
2 answers

gulp less compile only changed file

i have problem, when i run gulp watch -> run task styles:build, and all of my less files was recompile. How i can compile only changed file? gulp.task('styles:build', function () { return gulp.src(pathes.src.styles) …
Dmytro Lishtvan
  • 788
  • 7
  • 12
1
vote
1 answer

Build and inject files only on change in gulp

I am using gulp-inject and hash-generator to build my javascript files with unique names every time so as to avoid caching issues.Before building I run gulp-clean to remove the previously generator javascript files. The problem is, now every time I…
Gaurav
  • 609
  • 8
  • 20
0
votes
1 answer

Gulp-Change giving TypeError | React Application

I'm following a pretty basic tutorial for react to get acquainted with how it functions. So forgive me if I've missed something obvious. Part of the beginning of the tutorial was setting up gulp to handle sass files. So I set up my gulp file,…
0
votes
0 answers

gulp-changed doesn't work with a function inside of changed()

I installed gulp-changed on my scripts task and it works fine if I pass a string into it (ex: 'output/'). But on my project I'm using a function that returns the dest to be the same as the source: gulp.task('scripts', function(){ gulp.src([ …
sandrina-p
  • 3,794
  • 8
  • 32
  • 60
0
votes
1 answer

gulp-changed with gulp-concat not working

I want to compile only the .less files that have changed in order to speed up my debug/coding workflow. Here is my gulp task: gulp.src('core/**/*.less') .pipe(changed('core')) .pipe(less().on('error', handleError)) .pipe(autoprefixer('last 2…
Adavo
  • 865
  • 3
  • 11
  • 21
0
votes
1 answer

gulp-changed isn't filtering out non-changed files

I'm attempting to use gulp-changed to prevent time consuming tasks occurring on unchanged files. My gulpfile.js has it setup like so: gulp.task("min:css", function () { return gulp.src([paths.css, "!" + paths.minCss]) …
m.edmondson
  • 30,382
  • 27
  • 123
  • 206
0
votes
1 answer

gulp: pass only files changed in pipe

I try to sort through files, substitute text in some and save only changed. In my current code gulp-changed does nothing. const gulp = require('gulp'); const changed = require('gulp-changed'); const replace =…
Mikhail Vasin
  • 2,421
  • 1
  • 24
  • 31
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

gulp-changed does not overwrite files with differing content

If I make two files in two sibling directories with different content: nvioli$ echo "a" > test1/file.txt nvioli$ echo "b" > test2/file.txt then use gulp to output the first one to a destination folder, and try to overwrite it with the second one,…
nvioli
  • 4,137
  • 3
  • 22
  • 38
1
2