sindresorhus / gulp-filter

Filter files in a `vinyl` stream
MIT License
315 stars 37 forks source link

How to use with Yeoman Transform Stream #49

Closed trevordmiller closed 9 years ago

trevordmiller commented 9 years ago

From the "Transform output files through streams" section of the Yeoman docs, it says:

"Note that every file of any type will be passed through this stream. Make sure any transform stream will passthrough the files it doesn't support. Tools like gulp-if or gulp-filter will help filter invalid types and pass them through."

There is no further documentation or examples and the following gives an error of TypeError: object is not a function:

var gulpFilter = require('gulp-filter');

...

var beautifyFilter = gulpFilter([
  '_package.json'
]);

this.registerTransformStream(beautifyFilter(beautify({
  indentSize: 2,
  indentChar : ' ',
  preserveNewlines : false
})));
sindresorhus commented 9 years ago

You're opening this in the wrong place. This is for Yeoman to document.