Skip to content

Conversation

goto-bus-stop
Copy link
Member

When a transform stream emits 'dep', the path is added to the
transformed file's dependencies.
This is useful for something like split-require which uses a custom
require-like function. Instead of transforming the source code and
adding in dummy require() calls, split-require could emit the 'dep'
event.

@goto-bus-stop
Copy link
Member Author

goto-bus-stop commented Jan 31, 2018

Oh, this may not work well with watchify yet.

e; nevermind, watchify creates a new module-deps instance each run so it should be fine.

When a transform stream emits 'dep', the path is added to the
transformed file's dependencies.
This is useful for something like [split-require][0] which uses a custom
`require`-like function. Instead of transforming the source code and
adding in dummy `require()` calls, split-require could emit the 'dep'
event.

[0]: https://github.com/goto-bus-stop/split-require
@goto-bus-stop goto-bus-stop merged commit 9fe46d5 into master Feb 7, 2018
@goto-bus-stop goto-bus-stop deleted the dep-event branch February 7, 2018 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant