@develephant, your lit browser is really nice, good work! On Wed, Nov 18, 2015 at 6:52 PM, Tim Caswell <[email protected]> wrote:
> Right, luvi has hooks to auto-load luvit's require system if present. See > https://github.com/luvit/luvi/blob/master/src/lua/luvibundle.lua#L324-L335 > > Also it will auto-load luvit's pretty-print module if present and set `p` > as a global and redirect `print` to use libuv. I would recommend including > both of these with your app if you're building a luvit app directly. > > On Wed, Nov 18, 2015 at 2:05 PM, develephant <[email protected]> > wrote: > >> Thanks again. Seems to be working. My directory structure ended up like >> so (in case anyone else needs a visual): >> >> *app/* >> * deps/* >> * require.lua* >> * libs/* >> * greeting.lua* >> * main.lua* >> * package.lua* >> >> >> And the *package.lua:* >> >> *return {* >> * name = "lit/test",* >> * version = "0.0.1",* >> * dependencies = {* >> * "luvit/[email protected]",* >> * },* >> * files = {* >> * "**.lua",* >> * "!test*"* >> * }* >> *}* >> >> You can generate one these too at >> http://develephant.github.io/lit-browser/#/ >> >> Tip: You shouldn't "require" the require module. Or at least it appears >> that way. >> >> Cheers. >> >> On Wednesday, November 18, 2015 at 11:07:59 AM UTC-6, develephant wrote: >>> >>> Many thanks for the tip. I'll give it a try. >>> >>> Cheers. >>> >>> On Wednesday, November 18, 2015 at 10:38:32 AM UTC-6, Lionel Duboeuf >>> wrote: >>>> >>>> If any other best practices, i'm also interested ;-) >>>> but I agree, it is very confusing not to be able to load a lib like >>>> you've tried. >>>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "luvit" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "luvit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
