Skip to content

Commit

Permalink
Support for working with transforms
Browse files Browse the repository at this point in the history
Informing Watchify about files to watch.
  • Loading branch information
Kamil93 authored Apr 4, 2018
1 parent 11989b2 commit 9ea8a65
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,25 @@ 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 bundle in a non-standard way without requiring.
You can inform Watchify about these files by emiting '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 9ea8a65

Please sign in to comment.