lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Lua allows "require mymod" where "mymod" is a directory containing
anything, but including a file named "init.lua". This nicely solves
the problem of organizing one's code in a readable way while still not
expecting the user to make zillions of requires. Don't you do that
with Penlight, Steve?

2017-11-21 13:42 GMT+02:00 steve donovan <steve.j.donovan@gmail.com>:
> On Tue, Nov 21, 2017 at 3:49 PM, dyngeccetor8 <dyngeccetor8@disroot.org> wrote:
>> Unlike 'npm' way I deploy code with all used modules. So there is zero external
>> dependencies and no need to keep backward compatibility.
>
> I've always tended to that, to the point where I would release
> single-file 5000 line applications. Not really so good!
>
> However, it is not difficult to squeeze all needed little modules into
> a single archive - I've used Jay Carlson's soar to do this.
>
> With little modules, you then get 'smart linking' - only the code you
> use is included. Smart linking larger modules is harder to get right!
>