Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 'dep' event to transforms #141

Merged
merged 1 commit into from
Feb 7, 2018
Merged

add 'dep' event to transforms #141

merged 1 commit into from
Feb 7, 2018

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
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.

None yet

1 participant