Allow using JSON-based package definitions without altering any of the standard lit workflows (because it provides a clear separation between package metadata and Lua application code)
Creating executables via lit make should still work (this was my primary use case), without any changes
Don't alter any internals because the code is absolutely terrifying and everything will break... :cold_sweat:
Changes:
lit init supports a third format, lit-package.json (includes the exact same information, encoded as JSON)
lit make creates a temporary package.lua file when lit-package.json exists, uses it for the build process, then deletes it
The other commands aren't yet updated; I wasn't sure what needs changing, but I suppose every command must work with this format (feedback is required since I don't know the code well enough, or how people work with lit packages)
Potential Problems:
[ ] It currently alters only the lit init and lit make commands (I'm not sure which of the other ones need to be updated)
[ ] It requires using a table serialization library (introducing additional dependencies is... not great)
[ ] I don't know how to test everything's working since there's barely anything in the tests folder...
[ ] It currently only works if the lit-package.json exists and no package.lua format is used (priorities?)
Goals:
lit make
should still work (this was my primary use case), without any changesChanges:
lit init
supports a third format,lit-package.json
(includes the exact same information, encoded as JSON)lit make
creates a temporarypackage.lua
file whenlit-package.json
exists, uses it for the build process, then deletes itPotential Problems:
lit init
andlit make
commands (I'm not sure which of the other ones need to be updated)tests
folder...lit-package.json
exists and nopackage.lua
format is used (priorities?)