This is the companion repository for my Lua series on my Blog.
The main
branch is the latest iteration of the series. Every article has its own branch, based on what part it is. The first one being part-1
and so on.
How to get Lua and LuaRocks is in detail covered in the first article of the Lua series.
- direnv is optional, but very helpful
After cloning the repo and entering the project folder, load the project environment context with direnv allow
, and install all dependencies.
direnv allow # Only needed once
luarocks install --deps-only lua-series-1.1.0-1.rockspec
Now you can run any script from the project.
$ lua src/main.lua
{ "Hello, reader.", 42 }
After cloning the repo and entering the project folder install all dependencies.
luarocks install --deps-only lua-series-dev-1.rockspec
When running any script from the project you also need to load the setup module.
$ lua -lsrc/setup src/main.lua
{ "Hello, reader.", 42 }