Skip to content

Commit

Permalink
Merge pull request #357 from Kamil93/patch-1
Browse files Browse the repository at this point in the history
Add transform 'file' event to readme
  • Loading branch information
goto-bus-stop authored Apr 5, 2018
2 parents 11989b2 + d924e9b commit d232754
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,27 @@ X bytes written (Y seconds)

with the number of bytes in the bundle X and the time in seconds Y.

# working with browserify transforms

If your custom transform for browserify adds new files to the bundle in a non-standard way without requiring.
You can inform Watchify about these files by emiting a 'file' event.

```
module.exports = function(file) {
return through(
function(buf, enc, next) {
/*
manipulating file content
*/
this.emit("file", absolutePathToFileThatHasToBeWatched);
next();
}
);
};
```

# install

With [npm](https://npmjs.org) do:
Expand Down

0 comments on commit d232754

Please sign in to comment.