Skip to content

Commit

Permalink
queueTransformStream API change update
Browse files Browse the repository at this point in the history
registerTransformStream was [renamed to queueTransformStream](yeoman/generator@b25267a). This change updates the docs to reflect this.
  • Loading branch information
kethinov authored and mischah committed Sep 16, 2022
1 parent 7428537 commit 8288cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/authoring/file-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ The generator system allows you to apply custom filters on every file writes. Au

Once per Yeoman process, we will write every modified file to disk. This process is passed through a [vinyl](https://github.com/wearefractal/vinyl) object stream (just like [gulp](http://gulpjs.com/)). Any generator author can register a `transformStream` to modify the file path and/or the content.

Registering a new modifier is done through the `registerTransformStream()` method. Here's an example:
Queueing a new modifier is done through the `queueTransformStream()` method. Here's an example:

```js
var beautify = require("gulp-beautify");
this.registerTransformStream(beautify({ indent_size: 2 }));
this.queueTransformStream(beautify({ indent_size: 2 }));
```

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](https://github.com/robrich/gulp-if) or [gulp-filter](https://github.com/sindresorhus/gulp-filter) will help filter invalid types and pass them through.
Expand Down

0 comments on commit 8288cae

Please sign in to comment.