luabundle
luabundle copied to clipboard
Watch for changes.
Watch the base file, as well as all resolved files for changes, and re-bundle. Useful for building hot-reload tooling.
I'd probably say this one is a little bit out of scope for this core library; although it's definitely in scope for https://github.com/Benjamin-Dobell/luabundler.
My ideal solution would be a small luabundle-watch
package that takes a Lua search path and a list of module names. It'd watch for changes in resolved files as well as for the creation of new files that would be resolved instead of the existing resolved files (higher priority in the search path).
Additionally, it'd take the same proposed resolve
callback as luabundle itself https://github.com/Benjamin-Dobell/luabundle/issues/4
I'll leave this issue open though as a general issue to track any changes to luabundle that may be required to best facilitate a simple integration.
Yes. A separate module would be entirely fine. I wouldn't want it bundled into luabundler
though. I intend to consume this module directly.
I think a low-friction way to solve this would be to provide a lower level API than bundle
/ bundleString
. Expose a completion callback that consumers takeover from here.
I'm not yet in dire need of this functionality, and most of me spare time at the moment is taken up by development of Luanalysis.
So if you're keen to work on this, then I'll very happily merge PRs that introduce the necessary extension points and/or additional APIs.
For sure. Happy to.
Luanalysis is fantastic, BTW.