flute
flute copied to clipboard
unify package loader with lua's package.searchers
Look into package.searchers and implement a searcher function to require packages as if they were regular lua modules. The packages should have a modules directory and in there the submodules to be required, for example a package with this structure:
- packages
- my-package
- actions
- rules
- modules
- submodule
- my-package
submodule would be maybe a helper functions or something like that, and in lua it would be used with require("my-package.submodule")
https://gist.github.com/stevedonovan/1297868 https://github.com/deepakjois/luapackageloader/blob/master/luapackageloader.lua
@Arnaz87 so we can load strings directly without intermediary file? https://www.lua.org/manual/5.3/manual.html#pdf-load
https://github.com/foundpatterns/lighttouch-base/commit/f8d1e9e81c97e0c877aca0eba4c61b1ba08b63de