Re: require relative to file which is calling
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: require relative to file which is calling
- From: Valerio Schiavoni <valerio.schiavoni@...>
- Date: 2011年1月21日 18:04:23 +0100
hello Gustavo,
2011年1月21日 Gustavo de Sá Carvalho Honorato <gustavohonorato@gmail.com>:
> how can I use require function passing the file path relative to the file
> that is calling the require function, as we do with #include in C?
if you have the following structure:
a.lua
libs/b.lua
in a.lua you can do:
require"libs/b"
At least it works for me..