https://github.com/martinhelmut/lua-series
The companion repository to my Lua blog series.
https://github.com/martinhelmut/lua-series
lua luarocks
Last synced: 4 months ago
JSON representation
The companion repository to my Lua blog series.
- Host: GitHub
- URL: https://github.com/martinhelmut/lua-series
- Owner: MartinHelmut
- Created: 2023-02-23T10:50:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T19:05:49.000Z (over 1 year ago)
- Last Synced: 2025-06-26T12:51:54.535Z (7 months ago)
- Topics: lua, luarocks
- Language: Lua
- Homepage: https://martin-fieber.de/series/lua/
- Size: 51.8 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Lua series
This is the companion repository for my [Lua series on my Blog](https://martin-fieber.de/series/lua/).
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.
## Requirements
- [Lua](http://www.lua.org), version 5.1 or up
- [LuaRocks](https://luarocks.org), any recent version supporting Lua 5.1 and up, e.g. 3.9
How to get Lua and LuaRocks is in detail covered in [the first article of the Lua series](https://martin-fieber.de/blog/lua-project-setup-with-luarocks/).
- [direnv](https://direnv.net) is optional, but very helpful
## Setup and run
### With direnv
After cloning the repo and entering the project folder, load the project environment context with `direnv allow`, and install all dependencies.
```shell
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.
```shell
$ lua src/main.lua
{ "Hello, reader.", 42 }
```
### Without direnv
After cloning the repo and entering the project folder install all dependencies.
```shell
luarocks install --deps-only lua-series-dev-1.rockspec
```
When running any script from the project you also need to load the setup module.
```shell
$ lua -lsrc/setup src/main.lua
{ "Hello, reader.", 42 }
```