I have created a glob for gulp which ignores javascript and coffeescript files within a set of directories. I'd like it to copy all other files into a directory which works fine. The only problem is that when there are only javascript or coffeescript files it copies an empty folder. Any ideas how this glob could be amended to not copy empty folders?
gulp.task('copyfiles', function(){
gulp.src('apps/*/static_src/**/!(*.js|*.coffee)')
.pipe(gulp.dest('dest'));
});
Example source files:
apps/appname/static_src/images/image.jpg
apps/appname/static_src/js/script.js
Expected output:
dest/static_src/images/image.jpg
Current output:
dest/static_src/images/image.jpg
dest/static_src/js/