flute icon indicating copy to clipboard operation
flute copied to clipboard

unify package loader with lua's package.searchers

Open Arnaz87 opened this issue 7 years ago • 3 comments

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

submodule would be maybe a helper functions or something like that, and in lua it would be used with require("my-package.submodule")

Arnaz87 avatar Oct 25 '18 18:10 Arnaz87

https://gist.github.com/stevedonovan/1297868 https://github.com/deepakjois/luapackageloader/blob/master/luapackageloader.lua

naturallymitchell avatar Nov 04 '18 19:11 naturallymitchell

@Arnaz87 so we can load strings directly without intermediary file? https://www.lua.org/manual/5.3/manual.html#pdf-load

naturallymitchell avatar Nov 14 '18 17:11 naturallymitchell

https://github.com/foundpatterns/lighttouch-base/commit/f8d1e9e81c97e0c877aca0eba4c61b1ba08b63de

aleksanderwlodarczyk avatar Nov 30 '18 18:11 aleksanderwlodarczyk