gulp.src ignore option does not work
Created by: mprokopowicz
I can't get the 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'}));
});
[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
Am I misunderstanding something? I would really like to use ignore option in favour of "!whatever/**" pattern.
I'm using gulp 3.9.0