pointing lit at a custom directory

11 views
Skip to first unread message

Martin Croome

unread,
May 29, 2015, 11:58:39 AM5/29/15
to lu...@googlegroups.com
Hi. I'm (ab)using lit for a specific task where I need it to behave in a slightly different way. This means that I have to require db and core rather than pass via autocore. Is there any way to do this without creating my own version of the lit package?

Thanks

Tim Caswell

unread,
May 29, 2015, 12:57:03 PM5/29/15
to lu...@googlegroups.com
You can customize the litconfig to use via environment variables and you can customize where the database on disk is via the config file.  But if you want to change the behavior of lit itself beyond this you'll need to build a custom lit.

Luckilly this is trivially easy.  Also note that you can use luvi to run your custom lit without having to constantly rebuild the binary.

luvi path/to/custom/lit -- lit arguments



On Fri, May 29, 2015 at 10:58 AM, Martin Croome <martin...@gmail.com> wrote:
Hi. I'm (ab)using lit for a specific task where I need it to behave in a slightly different way. This means that I have to require db and core rather than pass via autocore. Is there any way to do this without creating my own version of the lit package?

Thanks

--
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 luvit+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Caswell

unread,
May 29, 2015, 12:58:20 PM5/29/15
to lu...@googlegroups.com
Also lit is available as a lit package you can depend on and use the code  from your app as a library.  The default exports is autocore, but there is nothing stopping you from reaching in and grabbing stuff directly.

Martin Croome

unread,
May 29, 2015, 3:47:51 PM5/29/15
to lu...@googlegroups.com
Hi Tim

That is really what I was asking. I'm already embedding it but I need to pick up core, db and vfs to do what I need to do. I tried to require them directly (lit/core, lit/libs/core and ./deps/lit/libs/core) but didn't seem to manage it. It always seemed to pickup autocore for some reason. Need to study the require code to figure it out.

Currently I just use my own init.lua but I'd prefer not to.

Martin

Tim Caswell

unread,
May 29, 2015, 11:03:38 PM5/29/15
to lu...@googlegroups.com
Ahh.  I wasn't careful to make everything in the libs folder work without pulling in autocore.  I'm open to ideas for ways to make the core libraries easier to use as libraries.  Feel free to open an issue describing what you need broken out.  Knowing you use case or at least requirements will help a ton in knowing where to refactor lit core.

From: Martin Croome
Sent: ‎5/‎29/‎2015 2:47 PM
To: lu...@googlegroups.com
Subject: Re: pointing lit at a custom directory

Reply all
Reply to author
Forward
0 new messages