Alfons - Cross-platform task runner

Started by daelvn, Dec 02, 2018, 06:44 pm

Previous topic - Next topic


Alfons - Cross-platform task runner
Alfons is a very simple task runner and project manager that runs in CC and in your computer. It will find for an "Alfonsfile", which should contain global-exported functions. This can be useful for things such as generating documentation automatically, cleaning the built files, compiling others...
Writing taskfiles
You can use MoonScript or Lua to write taskfiles
Code Select
-- alfons: lua
-- This header can be placed anywhere in the code, and is optional if your file has an extension.
task = function (self)
  -- -> The name of this task (task)
  -- self.ltext -> The ltext library
  -- self.file -> The fs API (outside of CC, this is the bundled file.lua module)
And, in the case of MoonScript
Code Select
-- alfons: moon
export task = =>
  print @name
Using Alfons
Basic usage consists in calling the Alfons script with a list of the tasks to run as arguments. Non-existing tasks will simply not be run.
Code Select
alfons task_1 task_2 task_3.

Installing Alfons
You can use the installer that uses bsrocks.
Code Select
pastebin run vbhNbjX4
Pastebin Installer
Pastebin Wrapper