javascript - Gulp.src ignore option -


i can't ignore option of gulp.src working:

'use strict';  var gulp = require('gulp'); var debug = require('gulp-debug');  var config = {   src: 'app/**/*.js',   test: 'app/**/*.test.js' }  gulp.task('default', function() {   return gulp.     src(config.src, {ignore: config.test}).     pipe(debug({title: 'debug'})); }); 

output:

[01:33:38] using gulpfile ~/projects/gulp-src/gulpfile.js [01:33:38] starting 'default'... [01:33:38] debug app/src.js [01:33:38] debug app/src.test.js [01:33:38] debug 2 items [01:33:38] finished 'default' after 19 ms 

according gulp api documentation, option object passed node-glob, has documented ignore option why code not work expected? misunderstanding something? use ignore option in favour of "!whatever/**" pattern.

gulp not pass through ignore option (it ignores ignore :-). instead, gulp has own negation (!) implementation, should use instead.

this behavior undocumented. submitted pull request corrected documentation.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -