1

I am trying to checkout files from dest folder when I change files in the src folder. Currently when I use tfs-gulp-checkout plugin it is checkout all the files, but I am trying to checkout only modified files in src folder to that of dest folder:

const tfs = require('gulp-tfs-checkout');
const gulpWatch = require('gulp-watch');

gulp.task('checkoutcss', function () {
    return gulp.src(['dest/Content/**/*.css'])
         .pipe(tfs())
});

gulp.task('build-less',["checkoutcss"], () => {
   return gulp.src('Content/**/*.less')
         .pipe(less())
         .pipe(gulp.dest('dest/Content'))
});

gulp.task('watch', () => {
    gulpWatch(["Content/**/*.less"], () => {
        runSequence('build-less', 'bs-reload');
    });
});

How can I check out only modified files in dest folder, for example only one less file is modified above code is checking out all the CSS files in the dest folder which I don't want to.

Here is another solution I found, but couldn't figure out how to use it with gulp task:

https://gist.github.com/loktar00/345d071d5086fec957ab

halfer
  • 19,824
  • 17
  • 99
  • 186
VR1256
  • 1,266
  • 4
  • 28
  • 56
  • Any reason you're checking in the files in `/dest` rather than just running gulp in TFS? – Duderino9000 Sep 03 '16 at 22:09
  • Are you checking in the changed files in dest folder into TFS and then want to check out them? Or the changed files are in your local work space? – Eddie Chen - MSFT Sep 05 '16 at 07:39
  • I am trying to modify less file in Content folder, and gulp task changes less to css and move it to dest\Content folder and I would check it in, from next time whenever less file is changed watch task would convert less to css and change the css file in dest\Content folder. The problem here is whenever less is changed above checkoutcss task is checking out all the css filder in the dest folder, I just want to checkout only the css file that is modified in less using gulp task, how do i do that. – VR1256 Sep 06 '16 at 20:17

0 Answers0