Ahh, my require path was bad.  Since you're calling from "bundle:main.lua"
getting to "bundle:init.lua" is simply "./init". (note the preceding "./".
This is only needed when you're layering luvit-app with your app.  The
preferred way these days is to install luvit as a dependency to your app
using lit. This can be done on your build machine.

    cd your/project
    lit install luvit/luvit

Then luvit's "init.lua" will be placed in deps/luvit/init.lua where require
can find it from anywhere as "luvit".

If you want to "cross-compile" luvi apps, lit can't do that with lit yet,
but you can build using lit normally and then swap out the luvi part with
the one custom compiled for your target.  Any binary addons will need to be
pre-compiled for your target arch too.

A luvi app it nothing more than the binary prefix with a zip file appended
to it.  You can manually create a zip of all your files and then append it
to your custom luvi build.

cat /path/to/custom/luvi /path/to/zip > myapp
chmod +x myapp

On Mon, Mar 16, 2015 at 12:05 PM, Jörg Krause <[email protected]>
wrote:

>
> Am 16.03.2015 17:23 schrieb "Ryan Phillips" <[email protected]>:
> >
> > Almost got it, try:
> >
> > return require('luvit')(function(...)
> >   ... rest of the code...
> > end, ...)
> >
>
> This fails with:
> [string "bundle:deps/require.lua"]:171: No such module 'luvit' in
> 'bundle:main.lua'
>
> --
> 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.

Reply via email to