gulp-dom-src icon indicating copy to clipboard operation
gulp-dom-src copied to clipboard

Missing positive glob

Open TCB13 opened this issue 9 years ago • 2 comments

I'm getting the following error:

[12:57:02] Error: Missing positive glob

Guess there was some BC on gulp or a dependency causing this? Thank you.

TCB13 avatar Oct 04 '16 11:10 TCB13

This usually happens when no files are given to the stream. It's a stupid rule in my opinion, but there you go.

trisys3 avatar Nov 11 '16 13:11 trisys3

@trisys3

yes, i also find it. this error comes when we support a tag selector not exist in target html file.

for example: gulp.task('test',function(){ console.log('test'); return gulp.src(‘./app/xx.html’,function(err,files){ files.map(function(entry){ console.log(entry); var fileName = path.basename(entry,".html"); var cwd=process.cwd(); var relativePath = path.relative(cwd,entry); var fullPath=path.join(cwd,relativePath); if(!relativePath) return; //if target html file does not have the selector 'img',it will come a error 'missing positive glob'.it is bad exactly when processing the batch html files. it is also a faulty that not support the physical path var ret = domSrc({file:relativePath,selector:'img',attribute:'src'}); ret.pipe(gulp.dest('dist/images'));
}) }) });

linusok avatar Oct 08 '17 04:10 linusok