Skip to content

MartinHelmut/lua-series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua series

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.

Requirements

  • Lua, version 5.1 or up
  • LuaRocks, 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.

  • direnv 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.

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 }

Without direnv

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 }

About

The companion repository to my Lua blog series.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Languages