I created a glob for gulp that ignores javascript and coffeescript files in a directory set. I would like it to copy all other files to a directory that works fine. The only problem is that when there are only javascript or coffeescript files, it copies the empty folder. Any ideas on how you can change this globe so as not to copy empty folders?
gulp.task('copyfiles', function(){ gulp.src('apps/*/static_src/**/!(*.js|*.coffee)') .pipe(gulp.dest('dest')); });
Sample source files:
apps/appname/static_src/images/image.jpg apps/appname/static_src/js/script.js
Expected Result:
dest/static_src/images/image.jpg
Current output:
dest/static_src/images/image.jpg dest/static_src/js/
source share