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:

  1. you're excluding top level cvs folder. exclude any folder/subfolder named cvs, need use '!' + mydir + '/**/cvs/**'.
  2. cvs/** select contents of cvs folder, not folder itself. if want exclude both folder and contents, explicitly: '!' + mydir + '/**/cvs', '!' + mydir + '/**/cvs/**'.

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -