Skip to content

m00qek/library-template.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

library-template.lua

Integration LuaRocks

A template to create pure Lua libraries

Using

Clone/download it locally and change the references to my_user, my_library accordingly to your new library name.

You'll need to install Lua and LuaRocks.

Testing

This uses busted, luassert and matcher_combinators to define tests in spec/ directory. To run them just execute

$ luarocks test --local

If you have entr(1) installed you may use it to run all tests whenever a file is changed using:

$ find spec/ src/ -name '*.lua' | entr luarocks test --local

Publishing

Your library must be hosted on github before making the first release. First, create a LuaRocks account and generate a new API key. This key must be used exclusively by the release Github Action, so copy and add it to the Secrets of your repo under the name LUAROCKS_KEY.

For the first release you just need to run the following commands:

$ git tag v0.1.0
$ git push --tags

For the next releases remember that you'll need to modify and copy/rename the .rockspec file to reflect the new version.

About

A template to create pure Lua libraries

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages