-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support hot-reload for Wechaty events listeners #820
Labels
Comments
Looks good for me.
Maybe you can support both. |
huan
added a commit
that referenced
this issue
Sep 25, 2017
@Gcaufy I just published a new NPM module as a Hot Module Reload tool named It supports TypeScript, please give it a try and let me know what you think. :) |
huan
added a commit
that referenced
this issue
Oct 1, 2017
Landed at v0.8.240. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The API might add the following new features:
1. addListener
If the second parameter is a string instead of a function, then we can use
func = require('./message-listener')
as the listener function, monitor the file, and reload it if the file had been updated.2. WechatyInstanceOptions
Wechaty will scan
./listenerDirectory/
for the files that the same name as the event, thenrequire
it and add it as the listener.See Also
CC @Gcaufy
The text was updated successfully, but these errors were encountered: