The result of this is Howl, a Lua build system. Howl is based mostly on Grunt and Rake. It uses 'tasks' , which can depend on other tasks.
Features
- Combine multiple files into one single executable
- Minify lua files
- Support for Oeed's Compilr
- Integration with the Busted testing framework
- Large portions work in normal Lua
I'm not sure how realistic these are, do say what else you would like below (or on Github).
- LDoc generation
Firstly you need to download Howl:
pastebin run LYAxmSby get 703e2f46ce68c2ca158673ff0ec4208c/Howl.min.lua Howl
Then you need to define a Howlfile, more on that later.
Then all you need to run is /Howl [task name]. Every directory from the current directory to the root will be checked for the presence of a Howlfile (Howlfile or Howlfile.lua). This will be executed.
Why?
Spoiler
I love to write in a modular format. Sometimes you get massive programs (*cough* Firewolf, *cough*) which are almost impossible to edit. The purpose of Howl started off as a way of me combining these files into one. The code runs just as quickly, and it is much easier to write and distribute.Obviously though, computer space is limited on computers. So minifying sources is key. Howl's minifyer reduces Howl's own filesize by half, which is clearly optimal. I haven't had a chance to run it on OneOS, but I'm sure the results not be dissimilar.
However combining, then minifying files every time is a very slow way of working. Howl does everything with one command instead, streamlining your workflow.
For my AES implementation, Howl automatically runs tests as well, ensuring that everything compiles with the official FIPS test vectors.
Basically, I'm awful at sales spiels: download this. It saves you time and effort (and it would make me happy if someone uses it).
Howlfiles
Spoiler
Howlfiles store all tasks and configuration about a project. The main documentation is on Howl's wiki, but I'll give an example here.
-- Define a list of dependencies
local sources = Dependencies(CurrentDirectory)
sources:Main "Awesome.lua"
:Depends "Utils"
:Depends "Submodule"
sources:Main "Utils.lua"
:Name "Utils"
sources:Main "Submodule.lua"
:Name "Submodule"
:Depends "SubmoduleUtils"
sources:Main "SubmoduleUtils.lua"
:Name "SubmoduleUtils"
-- Define a task to clean up
Tasks:Clean("clean", File "build")
-- Use the build in combiner task
Tasks:Combine("combine", sources, File "build/Result.lua", {"clean"})
-- Define a minifier task, this automatically runs "combine" to generate the "build/Results.lua" file
Tasks:Minify("minify", File "build/Result.lua", "build/Result.min.lua")
Tasks:Task "test"({"minify"}, function()
print("running some tests")
end):Description("Run some tests")
Tasks:Default("test") -- Set the default task.
You can read more on defining tasks on the Wiki.
Screenshots
Spoiler
The list of tasksRunning a task
Contributing
I'd love ideas, suggestions, feedback, or code! Howl is on GitHub, so do send me a pull request, or start an issue.