Open tadatuta opened 8 years ago
@tadatuta And what's wrong with this?
const filter = require('through2-filter').obj;
...
.pipe(filter(file => file.tech !== 'bemhtml.js'))
or do you want
.pipe(withoutTech('bemhtml.js'))
?
Yeah, feels like we need something like
bundle.src('js', {filter: {tech: ['vanilla.js', 'browser.js', 'js']}})
// or
bundle.src('js', {filter: ({tech}) => ['vanilla.js', 'browser.js', 'js'].includes(tech) })
// instead of
bundle.src('js').pipe(filter(f => ['vanilla.js', 'browser.js', 'js'].indexOf(f.tech) !== -1))
It's a very common case in the new world
Sugar for
.pipe(require('through2-filter').obj(file => file.tech !== 'bemhtml.js'))
needed.