gulp-glob

Gulp copying empty directories

一曲冷凌霜 提交于 2019-12-22 04:25:28
问题 In my gulp build I've made a task that runs after all compiling, uglifying and minification has occurred. This task simply copies everything from the src into the dest directory that hasn't been touched/processed by earlier tasks. The little issue I'm having is that this results in empty directories in the dest directory. Is there a way to tell the gulp.src glob to only include files in the pattern matching (like providing the 'is_file' flag)? Thanks. 回答1: Fixed it by adding a filter to the

Gulp globbing excluding files then unexcluding not working as described

走远了吗. 提交于 2019-12-12 20:15:43
问题 If I have the files client/ a.js bob.js bad.js And the gulp task gulp.task('copy', function() { return gulp.src(['client/*.js', '!client/b*.js', 'client/bad.js']) .pipe(gulp.dest('public')); }); then according to the documentation we should copy a.js and bad.js . However, when I run this with gulp v3.9.1, it only copies a.js . Is this a known bug? Is there a way to do this? 回答1: It's not a bug, the documentation is just wrong. The newest version of gulp is gulp@3.9.1 which uses vinyl-fs@0.3

Gulp copying empty directories

大憨熊 提交于 2019-12-05 03:27:03
In my gulp build I've made a task that runs after all compiling, uglifying and minification has occurred. This task simply copies everything from the src into the dest directory that hasn't been touched/processed by earlier tasks. The little issue I'm having is that this results in empty directories in the dest directory. Is there a way to tell the gulp.src glob to only include files in the pattern matching (like providing the 'is_file' flag)? Thanks. null Fixed it by adding a filter to the pipeline: var es = require('event-stream'); var onlyDirs = function(es) { return es.map(function(file,