While the fancy require() behavior is nice, and useful as sort of fake-Lua, it would also be nice to have a real macro preprocessor at hand, similar to cpp or m4. And while it's possible to invoke off-the-shelf preprocessors separately, it's not an easy out-of-the-box experience. Sometimes you just want a #include, or even a #define, and not have to think about the toolchain.
If cpp or m4 could be wrangled to work well with Lua source files, maybe p8tool build could offer built-in integration as options. If not, maybe it'd make sense to implement a simple proprietary macro preprocessor similar to cpp directly in p8tool build.
While the fancy require() behavior is nice, and useful as sort of fake-Lua, it would also be nice to have a real macro preprocessor at hand, similar to cpp or m4. And while it's possible to invoke off-the-shelf preprocessors separately, it's not an easy out-of-the-box experience. Sometimes you just want a
#include
, or even a#define
, and not have to think about the toolchain.If cpp or m4 could be wrangled to work well with Lua source files, maybe p8tool build could offer built-in integration as options. If not, maybe it'd make sense to implement a simple proprietary macro preprocessor similar to cpp directly in p8tool build.