All Projects → daelvn → alfons

daelvn / alfons

Licence: Unlicense license
🚀 Task runner for Lua and MoonScript.

Programming Languages

MoonScript
45 projects
lua
6591 projects

Projects that are alternatives of or similar to alfons

alfred
(v0.2) Even Batman needs a little help. Task runner. Automator. Build system.
Stars: ✭ 62 (+264.71%)
Mutual labels:  task-runner, build-tool
gow
Missing watch mode for Go commands. Watch Go files and execute a command like "go run" or "go test"
Stars: ✭ 343 (+1917.65%)
Mutual labels:  task-runner, build-tool
makesure
Simple task/command runner with declarative goals and dependencies
Stars: ✭ 230 (+1252.94%)
Mutual labels:  task-runner, build-tool
Air
☁️ Live reload for Go apps
Stars: ✭ 5,257 (+30823.53%)
Mutual labels:  task-runner, build-tool
Doit
task management & automation tool
Stars: ✭ 972 (+5617.65%)
Mutual labels:  task-runner, build-tool
nss-run
nss-run (not so simple run) is a very simplistic build tool.
Stars: ✭ 14 (-17.65%)
Mutual labels:  task-runner, build-tool
Task
A task runner / simpler Make alternative written in Go
Stars: ✭ 4,282 (+25088.24%)
Mutual labels:  task-runner, build-tool
rote
Automate everything.
Stars: ✭ 66 (+288.24%)
Mutual labels:  task-runner, build-tool
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+5164.71%)
Mutual labels:  task-runner, build-tool
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (+2811.76%)
Mutual labels:  task-runner, build-tool
Realize
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
Stars: ✭ 4,162 (+24382.35%)
Mutual labels:  task-runner, build-tool
Mmake
Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.
Stars: ✭ 1,593 (+9270.59%)
Mutual labels:  task-runner, build-tool
Ygor
Task toolkit. For when `npm run` isn't enough and everything else is too much.
Stars: ✭ 69 (+305.88%)
Mutual labels:  task-runner, build-tool
Foy
A simple, light-weight and modern task runner for general purpose.
Stars: ✭ 157 (+823.53%)
Mutual labels:  task-runner, build-tool
llmk
Light LaTeX Make
Stars: ✭ 93 (+447.06%)
Mutual labels:  build-tool
shell-loader
A Webpack loader that runs an arbitrary script on matching files
Stars: ✭ 18 (+5.88%)
Mutual labels:  build-tool
ukor
A Roku build tool with support for build flavors
Stars: ✭ 45 (+164.71%)
Mutual labels:  build-tool
taskctl
Concurrent task runner, developer's routine tasks automation toolkit. Simple modern alternative to GNU Make 🧰
Stars: ✭ 237 (+1294.12%)
Mutual labels:  task-runner
proguard-core
Library to read, write, analyze, and process java bytecode
Stars: ✭ 215 (+1164.71%)
Mutual labels:  build-tool
bask
A runner and framework for command-centric Bash scripts.
Stars: ✭ 31 (+82.35%)
Mutual labels:  task-runner

Alfons 4

GitHub Workflow Status GitHub stars GitHub tag (latest SemVer pre-release) LuaRocks

Alfons 4 is a rewrite of the original Alfons, written to be much more modular and usable. For the old Alfons 3, see the three GitHub branch.

Alfons is a task runner to help you manage your project. It's inspired by the worst use cases of Make (this means using make instead of shell scripts), it will read an Alfonsfile, extract the exported functions and run the tasks in order. I would tell you that there is no real reason to use this thing, but it's becoming surprisingly useful, so actually try it out.

Table of contents

Changelog

4.4

  • 4.4 (04.02.2021) Added exists and Experimental Teal Support.

Some critical bugs in the loading of taskfiles and the invocation of tasks have been fixed.

4.3

4.2

  • 4.2 (02.10.2020) Internal overhaul.

Alfons 4.2 changes the whole way that Alfons works on the inside. Please refer to Loading and API for the most notable work.

4.1

  • 4.1.4 (12.09.2020) - Bugfix on default task.
  • 4.1.3 (11.09.2020) - Funny Homestuck Number update. Fix inotify dependency.
  • 4.1.2 (29.08.2020) - More bugfixes
  • 4.1.1 (27.08.2020) - Bugfixes
  • 4.1 (27.08.2020) - Added uses

Usage

Run alfons in a directory with an Alfons.lua or Alfons.moon file. Using MoonScript (obviously) requires installing MoonScript via LuaRocks.

To see the documentation, check out the docs/ folder of this repo.

To get started using Alfons, check out the Tutorial or the Recipes.

Defining tasks

Tasks are obtained by either returning a table {tasks={}} where the empty table is a list of named functions, or by exporting globals. The preferred mode for Lua is exporting globals, and the preferred mode for MoonScript is returning a table, although both work in both languages.

Lua:

-- Exporting globals
function always(self) print(self.name) end
-- Returning table
return { tasks = {
  always = function(self) print(self.name) end
}}

MoonScript

-- Exporting globals
export always ==> print @name
-- Returning table
tasks:
  always: => @name

Calling tasks

From the command line, simply pass the name of the task you wish to run. Alternatively, use tasks.TASK to call TASK if it's loaded.

Lua:

function test (self)
  print("I am " .. self.name .. " and " .. self.caller .. " called me.")
end

function call (self)
  tasks.test{caller = self.name}
end

MoonScript:

tasks:
  test: => print "I am #{@name} and #{@caller} called me."
  call: => tasks.test caller: @name

Arguments

Arguments are passed in the self table of every function, which contains a field called name which is, well, uh, its own name. You can also use the args table to see the whole tree of arguments. Feel free to play with and abuse this!

Migrating from Alfons 3

Some functions are either not implemented or not yet ported.

Missing functions

moonc, git, clone and toflags do not exist anymore. The first three may be implemented at a later time, and the last won't be implemented due to the changes in Alfons' argument system. For now, you will have to use their command-line counterparts, so moonc file becomes sh "moonc #{file}" and such.

Importable tasks

fetch/fetchs is now just fetch, and ms-compile has been removed and will probably not come back. Write a compile task manually. This should work as a dropin replacement:

Lua:

compile = function()
  for file in wildcard "**.moon" do sh "moonc ".. file end
end

MoonScript:

compile: => sh "moonc #{file}" for file in wildcard "**.moon"

Installing

Since this is not upstream yet, you can't install through the LuaRocks server. However, you can install Alfons using itself.

Alfons 4 is now available on LuaRocks!

$ luarocks install alfons

Extra features

The preincluded task fetch depends on lua-http to be used. The watch function depends on linotify and will not work on platforms other than Linux.

$ luarocks install http     # lua-http
$ luarocks install inotify  # linotify

Projects using Alfons

Thanks for using the project <3.

License

Throwing it to the public domain. Check out the license.

Goodbye?

goodbye.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].