node.js - Gulp.js Ignoring source Control Files -
i have project structure thing like:
web a.html cvs foldera b.html cvs c.html
i trying use gulp copy src dest want ignore cvs folders [souce control] in levels. tried gulp-filter or !{dir} @ src, nothing works...
here gulpfile.js code same:
doesnt work:
gulp.task('default', function() { gulp.src([mydir+'/**']) .pipe(filter(['*', '!'+mydir+'/cvs/**'])) .pipe(gulp.dest(jboss_dir)); });
nor this:
gulp.task('default', function() { gulp.src([mydir+'/**', '!'+mydir+'/cvs/**']) .pipe(gulp.dest(jboss_dir)); });
two issues:
- you're excluding top level
cvs
folder. exclude any folder/subfolder namedcvs
, need use'!' + mydir + '/**/cvs/**'
. cvs/**
select contents ofcvs
folder, not folder itself. if want exclude both folder and contents, explicitly:'!' + mydir + '/**/cvs', '!' + mydir + '/**/cvs/**'
.
Comments
Post a Comment